pub struct RequestMetaObject {
pub client_capabilities: ClientCapabilities,
pub client_info: Option<Implementation>,
pub log_level: Option<LoggingLevel>,
pub protocol_version: String,
pub progress_token: Option<ProgressToken>,
pub extra: Option<Map<String, Value>>,
}Expand description
Latest MCP Protocol 2026_07_28 Extends {@link MetaObject} with additional request-specific fields. All key naming rules from MetaObject apply.
JSON schema
{
"description": "Extends {@link MetaObject} with additional request-specific fields. All key naming rules from MetaObject apply.",
"type": "object",
"required": [
"io.modelcontextprotocol/clientCapabilities",
"io.modelcontextprotocol/protocolVersion"
],
"properties": {
"io.modelcontextprotocol/clientCapabilities": {
"description": "The client's capabilities for this specific request. Required.\n\nCapabilities are declared per-request rather than once at initialization;\nan empty object means the client supports no optional capabilities.\nServers MUST NOT infer capabilities from prior requests.",
"$ref": "#/$defs/ClientCapabilities"
},
"io.modelcontextprotocol/clientInfo": {
"description": "Identifies the client software making the request. Clients SHOULD\ninclude this field on every request unless specifically configured not\nto do so.\n\nThe {@link Implementation} schema requires name and version; other\nfields are optional.\n\nThe value is self-reported by the client and is not verified by the\nprotocol. It is intended for display, logging, and debugging. Servers\nSHOULD NOT use it to change their behavior, and SHOULD NOT rely on it for\nsecurity decisions.",
"$ref": "#/$defs/Implementation"
},
"io.modelcontextprotocol/logLevel": {
"description": "The desired log level for this request. Optional.\n\nIf absent, the server MUST NOT send any {@link LoggingMessageNotificationnotifications/message}\nnotifications for this request. The client opts in to log messages by\nexplicitly setting a level. Replaces the former logging/setLevel RPC.",
"$ref": "#/$defs/LoggingLevel"
},
"io.modelcontextprotocol/protocolVersion": {
"description": "The MCP Protocol Version being used for this request. Required.\n\nFor the HTTP transport, this value MUST match the MCP-Protocol-Version\nheader; otherwise the server MUST return a 400 Bad Request. If the\nserver does not support the requested version, it MUST return an\n{@link UnsupportedProtocolVersionError}.",
"type": "string"
},
"progressToken": {
"description": "If specified, the caller is requesting out-of-band progress notifications for this request (as represented by {@link ProgressNotificationnotifications/progress}). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.",
"$ref": "#/$defs/ProgressToken"
}
},
"additionalProperties": {}
}Fields§
§client_capabilities: ClientCapabilitiesThe client’s capabilities for this specific request. Required. Capabilities are declared per-request rather than once at initialization; an empty object means the client supports no optional capabilities. Servers MUST NOT infer capabilities from prior requests.
client_info: Option<Implementation>Identifies the client software making the request. Clients SHOULD include this field on every request unless specifically configured not to do so. The {@link Implementation} schema requires name and version; other fields are optional. The value is self-reported by the client and is not verified by the protocol. It is intended for display, logging, and debugging. Servers SHOULD NOT use it to change their behavior, and SHOULD NOT rely on it for security decisions.
log_level: Option<LoggingLevel>The desired log level for this request. Optional. If absent, the server MUST NOT send any {@link LoggingMessageNotificationnotifications/message} notifications for this request. The client opts in to log messages by explicitly setting a level. Replaces the former logging/setLevel RPC.
protocol_version: StringThe MCP Protocol Version being used for this request. Required. For the HTTP transport, this value MUST match the MCP-Protocol-Version header; otherwise the server MUST return a 400 Bad Request. If the server does not support the requested version, it MUST return an {@link UnsupportedProtocolVersionError}.
progress_token: Option<ProgressToken>If specified, the caller is requesting out-of-band progress notifications for this request (as represented by {@link ProgressNotificationnotifications/progress}). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
extra: Option<Map<String, Value>>Implementations§
Source§impl RequestMetaObject
impl RequestMetaObject
Sourcepub fn new<T: Into<String>>(
protocol_version: T,
client_capabilities: ClientCapabilities,
) -> Self
pub fn new<T: Into<String>>( protocol_version: T, client_capabilities: ClientCapabilities, ) -> Self
Creates the connection-level _meta required on every 2026-07-28 request,
with the two mandatory fields: protocol version and client capabilities.
pub fn with_client_info(self, client_info: Implementation) -> Self
pub fn with_log_level(self, log_level: LoggingLevel) -> Self
pub fn with_progress_token(self, progress_token: ProgressToken) -> Self
Sourcepub fn traceparent(&self) -> Option<&str>
pub fn traceparent(&self) -> Option<&str>
Returns the W3C traceparent value, if present.
Sourcepub fn with_traceparent(self, traceparent: impl Into<String>) -> Self
pub fn with_traceparent(self, traceparent: impl Into<String>) -> Self
Sets the W3C traceparent value.
Sourcepub fn tracestate(&self) -> Option<&str>
pub fn tracestate(&self) -> Option<&str>
Returns the W3C tracestate value, if present.
Sourcepub fn with_tracestate(self, tracestate: impl Into<String>) -> Self
pub fn with_tracestate(self, tracestate: impl Into<String>) -> Self
Sets the W3C tracestate value.
Sourcepub fn with_baggage(self, baggage: impl Into<String>) -> Self
pub fn with_baggage(self, baggage: impl Into<String>) -> Self
Sets the W3C baggage value.
Trait Implementations§
Source§impl Clone for RequestMetaObject
impl Clone for RequestMetaObject
Source§fn clone(&self) -> RequestMetaObject
fn clone(&self) -> RequestMetaObject
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more