pub struct RequestMeta {
pub progress_token: Option<ProgressToken>,
pub protocol_version: Option<String>,
pub client_info: Option<Implementation>,
pub client_capabilities: Option<ClientCapabilities>,
pub log_level: Option<LogLevel>,
}Expand description
Request metadata (_meta).
Carries the progress token (all versions) and, under 2026-07-28 (SEP-2575),
the per-request protocol version, client identity, client capabilities, and
log level that replaced the initialize handshake. Every 2026-07-28 key is
optional here so a single type serves both protocol versions: a 2025-11-25
request carries none of them and serializes byte-identically. Use
RequestMeta::validate_for_version to enforce the keys a version requires.
Fields§
§progress_token: Option<ProgressToken>Progress token for receiving progress notifications.
protocol_version: Option<String>SEP-2575: the MCP protocol version for this request. Required on
2026-07-28; on the HTTP transport it MUST match the
MCP-Protocol-Version header.
client_info: Option<Implementation>SEP-2575: self-reported client software identity. Optional.
client_capabilities: Option<ClientCapabilities>SEP-2575: the client’s capabilities for this specific request. Required on 2026-07-28; declared per-request rather than once at initialization.
log_level: Option<LogLevel>SEP-2575: desired log level for this request. Optional.
Deprecated as of 2026-07-28 (SEP-2577); it replaced the logging/setLevel
RPC. If absent, the server MUST NOT emit notifications/message for the
request.
Implementations§
Source§impl RequestMeta
impl RequestMeta
Sourcepub fn validate_for_version(
&self,
protocol_version: &str,
) -> Result<(), MissingMetaKey>
pub fn validate_for_version( &self, protocol_version: &str, ) -> Result<(), MissingMetaKey>
Validate that the _meta keys the given protocol version requires are
present. Under 2026-07-28 (SEP-2575), protocolVersion and
clientCapabilities are required; earlier versions carry neither and
always pass.
Trait Implementations§
Source§impl Clone for RequestMeta
impl Clone for RequestMeta
Source§fn clone(&self) -> RequestMeta
fn clone(&self) -> RequestMeta
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more