Recommend this page to a friend! |
Classes of Mohamed Ahmed | Laravel MCP SDK | docs/api/_ClientCapabilities.md | Download |
|
![]() ClientCapabilitiesNamespace: `` Represents the capabilities of an MCP client. This class manages information about the features and capabilities supported by an MCP client. It includes experimental feature flags and root directory configurations. Client Capability Features: - Experimental feature management - Root directory configuration - State serialization/deserialization - Feature flag control Configuration Structure:
Example Usage:
@package LaravelMCP\MCP\Capabilities Methods__constructCreate a new client capabilities instance. Initializes a client capabilities configuration with optional experimental feature flags and root directory settings. Both parameters can be null to indicate undefined configurations. Example:
@param bool|null $experimental Whether experimental features are enabled
@param RootsCapability|null $roots Root directory configuration
isExperimentalCheck if experimental features are enabled. Determines whether experimental or beta features should be available in the client. These features may not be stable and could change in future releases. Example:
@return bool|null True if experimental features are enabled, false if not, null if unknown getRootsGet the root directory configuration. Retrieves the configuration for root directory management, including enabled state and configured root directories. Returns null if root management is not configured. Example:
@return RootsCapability|null The roots capability configuration toArrayConvert the capabilities to an array format. Transforms the client capabilities into a structured array suitable for storage or transmission. Only includes properties that have been explicitly set (non-null values). Example output:
@return array The capabilities data as a key-value array createCreate a new instance from array data. Factory method that constructs a ClientCapabilities instance from a configuration array. This is useful for deserializing stored configurations or processing API responses. Example:
@param array $data The data to create the instance from, containing:
@return static A new instance of the capabilities |