pub struct ClientCapabilities {
pub elicitation: Option<ClientElicitation>,
pub experimental: Option<BTreeMap<String, JsonObject>>,
pub extensions: Option<BTreeMap<String, JsonObject>>,
pub roots: Option<Map<String, Value>>,
pub sampling: Option<ClientSampling>,
}Expand description
Latest MCP Protocol 2026_07_28 Capabilities a client may support. Known capabilities are defined here, in this schema, but this is not a closed set: any client can define its own, additional capabilities.
JSON schema
{
"description": "Capabilities a client may support. Known capabilities are defined here, in this schema, but this is not a closed set: any client can define its own, additional capabilities.",
"type": "object",
"properties": {
"elicitation": {
"description": "Present if the client supports elicitation from the server.",
"type": "object",
"properties": {
"form": {
"$ref": "#/$defs/JSONObject"
},
"url": {
"$ref": "#/$defs/JSONObject"
}
}
},
"experimental": {
"description": "Experimental, non-standard capabilities that the client supports.",
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/JSONObject"
}
},
"extensions": {
"description": "Optional MCP extensions that the client supports. Keys are extension identifiers\n(e.g., \"io.modelcontextprotocol/oauth-client-credentials\"), and values are\nper-extension settings objects. An empty object indicates support with no settings.\n\nKeys MUST follow the {@link MetaObject_meta key naming rules}, with a\nmandatory prefix.",
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/JSONObject"
}
},
"roots": {
"description": "Present if the client supports listing roots.",
"type": "object"
},
"sampling": {
"description": "Present if the client supports sampling from an LLM.",
"type": "object",
"properties": {
"context": {
"description": "Whether the client supports context inclusion via includeContext parameter.\nIf not declared, servers SHOULD only use includeContext: \"none\" (or omit it).",
"$ref": "#/$defs/JSONObject"
},
"tools": {
"description": "Whether the client supports tool use via tools and toolChoice parameters.",
"$ref": "#/$defs/JSONObject"
}
}
}
}
}Fields§
§elicitation: Option<ClientElicitation>§experimental: Option<BTreeMap<String, JsonObject>>Experimental, non-standard capabilities that the client supports.
extensions: Option<BTreeMap<String, JsonObject>>Optional MCP extensions that the client supports. Keys are extension identifiers (e.g., “io.modelcontextprotocol/oauth-client-credentials”), and values are per-extension settings objects. An empty object indicates support with no settings. Keys MUST follow the {@link MetaObject_meta key naming rules}, with a mandatory prefix.
roots: Option<Map<String, Value>>Present if the client supports listing roots.
sampling: Option<ClientSampling>Implementations§
Source§impl ClientCapabilities
impl ClientCapabilities
Sourcepub fn can_handle_request(
&self,
server_jsonrpc_request: &ServerJsonrpcRequest,
) -> Result<(), RpcError>
pub fn can_handle_request( &self, server_jsonrpc_request: &ServerJsonrpcRequest, ) -> Result<(), RpcError>
Asserts that the client supports the requested server-initiated operation.
In the 2026-07-28 protocol, server→client requests arrive as InputRequests
(mid-request) or standalone JSON-RPC requests. Each maps to a client capability:
sampling/createMessage→samplingroots/list→rootselicitation/create→elicitation
Trait Implementations§
Source§impl Clone for ClientCapabilities
impl Clone for ClientCapabilities
Source§fn clone(&self) -> ClientCapabilities
fn clone(&self) -> ClientCapabilities
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more