From 2190996b8258e6ed5ceaf7ada9c0ebea949ad293 Mon Sep 17 00:00:00 2001 From: Ali Hashemi Date: Tue, 10 Mar 2026 19:15:32 -0300 Subject: [PATCH 1/3] feat: Update MCP schema to latest version and add method() to RpcMessage trait --- Cargo.toml | 2 +- src/generated_schema/2024_11_05/mcp_schema.rs | 4 +- .../2024_11_05/schema_utils.rs | 12 +- src/generated_schema/2025_03_26/mcp_schema.rs | 4 +- .../2025_03_26/schema_utils.rs | 11 +- src/generated_schema/2025_06_18/mcp_schema.rs | 4 +- .../2025_06_18/schema_utils.rs | 8 + src/generated_schema/2025_11_25/mcp_schema.rs | 4 +- .../2025_11_25/schema_utils.rs | 53 +++ src/generated_schema/draft/mcp_schema.rs | 326 ++++++++++++------ src/generated_schema/draft/schema_utils.rs | 113 +++--- 11 files changed, 378 insertions(+), 163 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 3c1da0f..39c3aa4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,7 +38,7 @@ features = ["2025_11_25", "schema_utils"] [features] # default features -default = ["2025_11_25", "schema_utils"] # Default features +default = ["2025_03_26", "schema_utils"] # Default features # activates the latest MCP schema version, this will be updated once a new version of schema is published latest = ["2025_11_25"] diff --git a/src/generated_schema/2024_11_05/mcp_schema.rs b/src/generated_schema/2024_11_05/mcp_schema.rs index cd8d308..e18c376 100644 --- a/src/generated_schema/2024_11_05/mcp_schema.rs +++ b/src/generated_schema/2024_11_05/mcp_schema.rs @@ -7,8 +7,8 @@ /// modify or extend the implementations as needed, but please do so at your own risk. /// /// Generated from : -/// Hash : 0b3a76e5b39abca1c865af9ce1565a98e59dfab1 -/// Generated at : 2026-01-22 09:32:57 +/// Hash : e14831553a82c059d6e2fc866084b26e82ae791a +/// Generated at : 2026-03-10 19:10:27 /// ---------------------------------------------------------------------------- /// use super::validators as validate; diff --git a/src/generated_schema/2024_11_05/schema_utils.rs b/src/generated_schema/2024_11_05/schema_utils.rs index 9ee8c60..5285f6d 100644 --- a/src/generated_schema/2024_11_05/schema_utils.rs +++ b/src/generated_schema/2024_11_05/schema_utils.rs @@ -132,6 +132,15 @@ impl Hash for RequestId { } } +impl core::fmt::Display for RequestId { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + match *self { + RequestId::String(ref s) => write!(f, "{}", s), + RequestId::Integer(i) => write!(f, "{}", i), + } + } +} + //*******************// //** ClientMessage **// //*******************// @@ -1479,7 +1488,7 @@ impl CallToolError { let message = message.unwrap_or(default_message); // Format the full error message - let full_message = format!("Invalid arguments for tool '{tool_name}': {message}" ); + let full_message = format!("Invalid arguments for tool '{tool_name}': {message}"); Self::from_message(full_message) } @@ -1521,7 +1530,6 @@ impl CallToolError { } } - /// Converts a `CallToolError` into a `RpcError`. /// /// The conversion creates an internal error variant of `RpcError` diff --git a/src/generated_schema/2025_03_26/mcp_schema.rs b/src/generated_schema/2025_03_26/mcp_schema.rs index 00f77a5..2d717d3 100644 --- a/src/generated_schema/2025_03_26/mcp_schema.rs +++ b/src/generated_schema/2025_03_26/mcp_schema.rs @@ -7,8 +7,8 @@ /// modify or extend the implementations as needed, but please do so at your own risk. /// /// Generated from : -/// Hash : 0b3a76e5b39abca1c865af9ce1565a98e59dfab1 -/// Generated at : 2026-01-22 09:32:59 +/// Hash : e14831553a82c059d6e2fc866084b26e82ae791a +/// Generated at : 2026-03-10 19:10:29 /// ---------------------------------------------------------------------------- /// use super::validators as validate; diff --git a/src/generated_schema/2025_03_26/schema_utils.rs b/src/generated_schema/2025_03_26/schema_utils.rs index ade787f..be6e0c8 100644 --- a/src/generated_schema/2025_03_26/schema_utils.rs +++ b/src/generated_schema/2025_03_26/schema_utils.rs @@ -132,6 +132,14 @@ impl Hash for RequestId { } } +impl core::fmt::Display for RequestId { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + match *self { + RequestId::String(ref s) => write!(f, "{}", s), + RequestId::Integer(i) => write!(f, "{}", i), + } + } +} //*******************// //** ClientMessage **// //*******************// @@ -1479,7 +1487,7 @@ impl CallToolError { let message = message.unwrap_or(default_message); // Format the full error message - let full_message = format!("Invalid arguments for tool '{tool_name}': {message}" ); + let full_message = format!("Invalid arguments for tool '{tool_name}': {message}"); Self::from_message(full_message) } @@ -1521,7 +1529,6 @@ impl CallToolError { } } - /// Converts a `CallToolError` into a `RpcError`. /// /// The conversion creates an internal error variant of `RpcError` diff --git a/src/generated_schema/2025_06_18/mcp_schema.rs b/src/generated_schema/2025_06_18/mcp_schema.rs index d4fd66f..7b3fbd4 100644 --- a/src/generated_schema/2025_06_18/mcp_schema.rs +++ b/src/generated_schema/2025_06_18/mcp_schema.rs @@ -7,8 +7,8 @@ /// modify or extend the implementations as needed, but please do so at your own risk. /// /// Generated from : -/// Hash : 0b3a76e5b39abca1c865af9ce1565a98e59dfab1 -/// Generated at : 2026-01-22 09:33:00 +/// Hash : e14831553a82c059d6e2fc866084b26e82ae791a +/// Generated at : 2026-03-10 19:10:29 /// ---------------------------------------------------------------------------- /// use super::validators as validate; diff --git a/src/generated_schema/2025_06_18/schema_utils.rs b/src/generated_schema/2025_06_18/schema_utils.rs index a2a5da8..56a80a1 100644 --- a/src/generated_schema/2025_06_18/schema_utils.rs +++ b/src/generated_schema/2025_06_18/schema_utils.rs @@ -131,6 +131,14 @@ impl Hash for RequestId { } } +impl core::fmt::Display for RequestId { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + match *self { + RequestId::String(ref s) => write!(f, "{}", s), + RequestId::Integer(i) => write!(f, "{}", i), + } + } +} //*******************// //** ClientMessage **// //*******************// diff --git a/src/generated_schema/2025_11_25/mcp_schema.rs b/src/generated_schema/2025_11_25/mcp_schema.rs index 5bd9084..8d71524 100644 --- a/src/generated_schema/2025_11_25/mcp_schema.rs +++ b/src/generated_schema/2025_11_25/mcp_schema.rs @@ -7,8 +7,8 @@ /// modify or extend the implementations as needed, but please do so at your own risk. /// /// Generated from : -/// Hash : 0b3a76e5b39abca1c865af9ce1565a98e59dfab1 -/// Generated at : 2026-01-22 09:33:00 +/// Hash : e14831553a82c059d6e2fc866084b26e82ae791a +/// Generated at : 2026-03-10 19:10:30 /// ---------------------------------------------------------------------------- /// use super::validators as validate; diff --git a/src/generated_schema/2025_11_25/schema_utils.rs b/src/generated_schema/2025_11_25/schema_utils.rs index df45559..7a5ba82 100644 --- a/src/generated_schema/2025_11_25/schema_utils.rs +++ b/src/generated_schema/2025_11_25/schema_utils.rs @@ -64,6 +64,7 @@ fn detect_message_type(value: &serde_json::Value) -> MessageTypes { pub trait RpcMessage: McpMessage { fn request_id(&self) -> Option<&RequestId>; fn jsonrpc(&self) -> &str; + fn method(&self) -> Option<&str>; } pub trait McpMessage { @@ -133,6 +134,14 @@ impl Hash for RequestId { } } +impl core::fmt::Display for RequestId { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + match *self { + RequestId::String(ref s) => write!(f, "{}", s), + RequestId::Integer(i) => write!(f, "{}", i), + } + } +} //*******************// //** ClientMessage **// //*******************// @@ -307,6 +316,15 @@ impl RpcMessage for ClientMessage { ClientMessage::Error(jsonrpc_error) => jsonrpc_error.jsonrpc(), } } + + fn method(&self) -> Option<&str> { + match self { + ClientMessage::Request(client_jsonrpc_request) => Some(client_jsonrpc_request.method()), + ClientMessage::Notification(client_jsonrpc_notification) => Some(client_jsonrpc_notification.method()), + ClientMessage::Response(_) => None, + ClientMessage::Error(_) => None, + } + } } // Implementing the `McpMessage` trait for `ClientMessage` @@ -693,6 +711,17 @@ impl ClientJsonrpcNotification { pub fn is_initialized_notification(&self) -> bool { matches!(self, Self::InitializedNotification(_)) } + + pub fn method(&self) -> &str { + match self { + ClientJsonrpcNotification::CancelledNotification(notification) => notification.method(), + ClientJsonrpcNotification::InitializedNotification(notification) => notification.method(), + ClientJsonrpcNotification::ProgressNotification(notification) => notification.method(), + ClientJsonrpcNotification::TaskStatusNotification(notification) => notification.method(), + ClientJsonrpcNotification::RootsListChangedNotification(notification) => notification.method(), + ClientJsonrpcNotification::CustomNotification(notification) => notification.method.as_str(), + } + } } impl From for NotificationFromClient { @@ -1070,6 +1099,15 @@ impl RpcMessage for ServerMessage { ServerMessage::Error(jsonrpc_error) => jsonrpc_error.jsonrpc(), } } + + fn method(&self) -> Option<&str> { + match self { + ServerMessage::Request(server_jsonrpc_request) => Some(server_jsonrpc_request.method()), + ServerMessage::Notification(server_jsonrpc_notification) => Some(server_jsonrpc_notification.method()), + ServerMessage::Response(_) => None, + ServerMessage::Error(_) => None, + } + } } // Implementing the `McpMessage` trait for `ServerMessage` @@ -1406,6 +1444,21 @@ impl ServerJsonrpcNotification { ServerJsonrpcNotification::CustomNotification(notification) => notification.jsonrpc(), } } + + fn method(&self) -> &str { + match self { + ServerJsonrpcNotification::CancelledNotification(notification) => notification.method(), + ServerJsonrpcNotification::ProgressNotification(notification) => notification.method(), + ServerJsonrpcNotification::ResourceListChangedNotification(notification) => notification.method(), + ServerJsonrpcNotification::ResourceUpdatedNotification(notification) => notification.method(), + ServerJsonrpcNotification::PromptListChangedNotification(notification) => notification.method(), + ServerJsonrpcNotification::ToolListChangedNotification(notification) => notification.method(), + ServerJsonrpcNotification::TaskStatusNotification(notification) => notification.method(), + ServerJsonrpcNotification::LoggingMessageNotification(notification) => notification.method(), + ServerJsonrpcNotification::ElicitationCompleteNotification(notification) => notification.method(), + ServerJsonrpcNotification::CustomNotification(notification) => ¬ification.method, + } + } } /// Formats the ServerJsonrpcNotification as a JSON string. diff --git a/src/generated_schema/draft/mcp_schema.rs b/src/generated_schema/draft/mcp_schema.rs index 178c171..0f0e382 100644 --- a/src/generated_schema/draft/mcp_schema.rs +++ b/src/generated_schema/draft/mcp_schema.rs @@ -7,8 +7,8 @@ /// modify or extend the implementations as needed, but please do so at your own risk. /// /// Generated from : -/// Hash : 0b3a76e5b39abca1c865af9ce1565a98e59dfab1 -/// Generated at : 2026-01-22 09:33:01 +/// Hash : e14831553a82c059d6e2fc866084b26e82ae791a +/// Generated at : 2026-03-10 19:10:31 /// ---------------------------------------------------------------------------- /// use super::validators as validate; @@ -820,12 +820,10 @@ pub struct CancelledNotificationParams { /// "type": "object", /// "properties": { /// "form": { -/// "type": "object", -/// "additionalProperties": true +/// "$ref": "#/$defs/JSONObject" /// }, /// "url": { -/// "type": "object", -/// "additionalProperties": true +/// "$ref": "#/$defs/JSONObject" /// } /// } /// }, @@ -833,6 +831,13 @@ pub struct CancelledNotificationParams { /// "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.", +/// "type": "object", +/// "additionalProperties": { /// "type": "object", /// "additionalProperties": true /// } @@ -853,13 +858,11 @@ pub struct CancelledNotificationParams { /// "properties": { /// "context": { /// "description": "Whether the client supports context inclusion via includeContext parameter.\nIf not declared, servers SHOULD only use includeContext: \"none\" (or omit it).", -/// "type": "object", -/// "additionalProperties": true +/// "$ref": "#/$defs/JSONObject" /// }, /// "tools": { /// "description": "Whether the client supports tool use via tools and toolChoice parameters.", -/// "type": "object", -/// "additionalProperties": true +/// "$ref": "#/$defs/JSONObject" /// } /// } /// }, @@ -869,13 +872,11 @@ pub struct CancelledNotificationParams { /// "properties": { /// "cancel": { /// "description": "Whether this client supports {@link CancelTaskRequesttasks/cancel}.", -/// "type": "object", -/// "additionalProperties": true +/// "$ref": "#/$defs/JSONObject" /// }, /// "list": { /// "description": "Whether this client supports {@link ListTasksRequesttasks/list}.", -/// "type": "object", -/// "additionalProperties": true +/// "$ref": "#/$defs/JSONObject" /// }, /// "requests": { /// "description": "Specifies which request types can be augmented with tasks.", @@ -887,8 +888,7 @@ pub struct CancelledNotificationParams { /// "properties": { /// "create": { /// "description": "Whether the client supports task-augmented {@link ElicitRequestelicitation/create} requests.", -/// "type": "object", -/// "additionalProperties": true +/// "$ref": "#/$defs/JSONObject" /// } /// } /// }, @@ -898,8 +898,7 @@ pub struct CancelledNotificationParams { /// "properties": { /// "createMessage": { /// "description": "Whether the client supports task-augmented sampling/createMessage requests.", -/// "type": "object", -/// "additionalProperties": true +/// "$ref": "#/$defs/JSONObject" /// } /// } /// } @@ -917,7 +916,12 @@ pub struct ClientCapabilities { pub elicitation: ::std::option::Option, ///Experimental, non-standard capabilities that the client supports. #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] - pub experimental: ::std::option::Option< + pub experimental: ::std::option::Option<::std::collections::HashMap<::std::string::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.*/ + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub extensions: ::std::option::Option< ::std::collections::HashMap<::std::string::String, ::serde_json::Map<::std::string::String, ::serde_json::Value>>, >, #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] @@ -937,12 +941,10 @@ pub struct ClientCapabilities { /// "type": "object", /// "properties": { /// "form": { -/// "type": "object", -/// "additionalProperties": true +/// "$ref": "#/$defs/JSONObject" /// }, /// "url": { -/// "type": "object", -/// "additionalProperties": true +/// "$ref": "#/$defs/JSONObject" /// } /// } ///} @@ -951,9 +953,9 @@ pub struct ClientCapabilities { #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default)] pub struct ClientElicitation { #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] - pub form: ::std::option::Option<::serde_json::Map<::std::string::String, ::serde_json::Value>>, + pub form: ::std::option::Option, #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] - pub url: ::std::option::Option<::serde_json::Map<::std::string::String, ::serde_json::Value>>, + pub url: ::std::option::Option, } ///ClientNotification /// @@ -1306,13 +1308,11 @@ pub struct ClientRoots { /// "properties": { /// "context": { /// "description": "Whether the client supports context inclusion via includeContext parameter.\nIf not declared, servers SHOULD only use includeContext: \"none\" (or omit it).", -/// "type": "object", -/// "additionalProperties": true +/// "$ref": "#/$defs/JSONObject" /// }, /// "tools": { /// "description": "Whether the client supports tool use via tools and toolChoice parameters.", -/// "type": "object", -/// "additionalProperties": true +/// "$ref": "#/$defs/JSONObject" /// } /// } ///} @@ -1323,10 +1323,10 @@ pub struct ClientSampling { /**Whether the client supports context inclusion via includeContext parameter. If not declared, servers SHOULD only use includeContext: "none" (or omit it).*/ #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] - pub context: ::std::option::Option<::serde_json::Map<::std::string::String, ::serde_json::Value>>, + pub context: ::std::option::Option, ///Whether the client supports tool use via tools and toolChoice parameters. #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] - pub tools: ::std::option::Option<::serde_json::Map<::std::string::String, ::serde_json::Value>>, + pub tools: ::std::option::Option, } ///Task support for elicitation-related requests. /// @@ -1339,8 +1339,7 @@ pub struct ClientSampling { /// "properties": { /// "create": { /// "description": "Whether the client supports task-augmented {@link ElicitRequestelicitation/create} requests.", -/// "type": "object", -/// "additionalProperties": true +/// "$ref": "#/$defs/JSONObject" /// } /// } ///} @@ -1350,7 +1349,7 @@ pub struct ClientSampling { pub struct ClientTaskElicitation { ///Whether the client supports task-augmented {@link ElicitRequestelicitation/create} requests. #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] - pub create: ::std::option::Option<::serde_json::Map<::std::string::String, ::serde_json::Value>>, + pub create: ::std::option::Option, } ///Specifies which request types can be augmented with tasks. /// @@ -1367,8 +1366,7 @@ pub struct ClientTaskElicitation { /// "properties": { /// "create": { /// "description": "Whether the client supports task-augmented {@link ElicitRequestelicitation/create} requests.", -/// "type": "object", -/// "additionalProperties": true +/// "$ref": "#/$defs/JSONObject" /// } /// } /// }, @@ -1378,8 +1376,7 @@ pub struct ClientTaskElicitation { /// "properties": { /// "createMessage": { /// "description": "Whether the client supports task-augmented sampling/createMessage requests.", -/// "type": "object", -/// "additionalProperties": true +/// "$ref": "#/$defs/JSONObject" /// } /// } /// } @@ -1405,8 +1402,7 @@ pub struct ClientTaskRequest { /// "properties": { /// "createMessage": { /// "description": "Whether the client supports task-augmented sampling/createMessage requests.", -/// "type": "object", -/// "additionalProperties": true +/// "$ref": "#/$defs/JSONObject" /// } /// } ///} @@ -1416,7 +1412,7 @@ pub struct ClientTaskRequest { pub struct ClientTaskSampling { ///Whether the client supports task-augmented sampling/createMessage requests. #[serde(rename = "createMessage", default, skip_serializing_if = "::std::option::Option::is_none")] - pub create_message: ::std::option::Option<::serde_json::Map<::std::string::String, ::serde_json::Value>>, + pub create_message: ::std::option::Option, } ///Present if the client supports task-augmented requests. /// @@ -1429,13 +1425,11 @@ pub struct ClientTaskSampling { /// "properties": { /// "cancel": { /// "description": "Whether this client supports {@link CancelTaskRequesttasks/cancel}.", -/// "type": "object", -/// "additionalProperties": true +/// "$ref": "#/$defs/JSONObject" /// }, /// "list": { /// "description": "Whether this client supports {@link ListTasksRequesttasks/list}.", -/// "type": "object", -/// "additionalProperties": true +/// "$ref": "#/$defs/JSONObject" /// }, /// "requests": { /// "description": "Specifies which request types can be augmented with tasks.", @@ -1447,8 +1441,7 @@ pub struct ClientTaskSampling { /// "properties": { /// "create": { /// "description": "Whether the client supports task-augmented {@link ElicitRequestelicitation/create} requests.", -/// "type": "object", -/// "additionalProperties": true +/// "$ref": "#/$defs/JSONObject" /// } /// } /// }, @@ -1458,8 +1451,7 @@ pub struct ClientTaskSampling { /// "properties": { /// "createMessage": { /// "description": "Whether the client supports task-augmented sampling/createMessage requests.", -/// "type": "object", -/// "additionalProperties": true +/// "$ref": "#/$defs/JSONObject" /// } /// } /// } @@ -1473,10 +1465,10 @@ pub struct ClientTaskSampling { pub struct ClientTasks { ///Whether this client supports {@link CancelTaskRequesttasks/cancel}. #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] - pub cancel: ::std::option::Option<::serde_json::Map<::std::string::String, ::serde_json::Value>>, + pub cancel: ::std::option::Option, ///Whether this client supports {@link ListTasksRequesttasks/list}. #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] - pub list: ::std::option::Option<::serde_json::Map<::std::string::String, ::serde_json::Value>>, + pub list: ::std::option::Option, #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] pub requests: ::std::option::Option, } @@ -1742,7 +1734,8 @@ impl ::std::convert::From for CompleteRequestRef { /// "type": "array", /// "items": { /// "type": "string" -/// } +/// }, +/// "maxItems": 100 /// } /// } /// } @@ -1780,7 +1773,8 @@ pub struct CompleteResult { /// "type": "array", /// "items": { /// "type": "string" -/// } +/// }, +/// "maxItems": 100 /// } /// } ///} @@ -2079,8 +2073,7 @@ impl CreateMessageRequest { /// }, /// "metadata": { /// "description": "Optional metadata to pass through to the LLM provider. The format of this metadata is provider-specific.", -/// "type": "object", -/// "additionalProperties": true +/// "$ref": "#/$defs/JSONObject" /// }, /// "modelPreferences": { /// "description": "The server's preferences for which model to select. The client MAY ignore these preferences.", @@ -2135,7 +2128,7 @@ pub struct CreateMessageRequestParams { pub meta: ::std::option::Option, ///Optional metadata to pass through to the LLM provider. The format of this metadata is provider-specific. #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] - pub metadata: ::std::option::Option<::serde_json::Map<::std::string::String, ::serde_json::Value>>, + pub metadata: ::std::option::Option, ///The server's preferences for which model to select. The client MAY ignore these preferences. #[serde( rename = "modelPreferences", @@ -4047,6 +4040,7 @@ impl ImageContent { /// "type": "string" /// }, /// "version": { +/// "description": "The version of this implementation.", /// "type": "string" /// }, /// "websiteUrl": { @@ -4084,6 +4078,7 @@ pub struct Implementation { if present).*/ #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] pub title: ::std::option::Option<::std::string::String>, + ///The version of this implementation. pub version: ::std::string::String, ///An optional URL of the website for this implementation. #[serde(rename = "websiteUrl", default, skip_serializing_if = "::std::option::Option::is_none")] @@ -4255,7 +4250,7 @@ pub struct InitializeRequestParams { /// "$ref": "#/$defs/ServerCapabilities" /// }, /// "instructions": { -/// "description": "Instructions describing how to use the server and its features.\n\nThis can be used by clients to improve the LLM's understanding of available tools, resources, etc. It can be thought of like a \"hint\" to the model. For example, this information MAY be added to the system prompt.", +/// "description": "Instructions describing how to use the server and its features.\n\nInstructions should focus on information that helps the model use the server effectively (e.g., cross-tool relationships, workflow patterns, constraints), but should not duplicate information already in tool descriptions.\n\nClients MAY add this information to the system prompt.", /// "type": "string" /// }, /// "protocolVersion": { @@ -4273,7 +4268,8 @@ pub struct InitializeRequestParams { pub struct InitializeResult { pub capabilities: ServerCapabilities, /**Instructions describing how to use the server and its features. - This can be used by clients to improve the LLM's understanding of available tools, resources, etc. It can be thought of like a "hint" to the model. For example, this information MAY be added to the system prompt.*/ + Instructions should focus on information that helps the model use the server effectively (e.g., cross-tool relationships, workflow patterns, constraints), but should not duplicate information already in tool descriptions. + Clients MAY add this information to the system prompt.*/ #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] pub instructions: ::std::option::Option<::std::string::String>, #[serde(rename = "_meta", default, skip_serializing_if = "::std::option::Option::is_none")] @@ -4516,6 +4512,118 @@ pub struct InvalidRequestError { ///A short description of the error. The message SHOULD be limited to a concise single sentence. pub message: ::std::string::String, } +///JsonArray +/// +///
JSON schema +/// +/// ```json +///{ +/// "type": "array", +/// "items": { +/// "$ref": "#/$defs/JSONValue" +/// } +///} +/// ``` +///
+#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] +#[serde(transparent)] +pub struct JsonArray(pub ::std::vec::Vec); +///JsonObject +/// +///
JSON schema +/// +/// ```json +///{ +/// "type": "object", +/// "additionalProperties": { +/// "$ref": "#/$defs/JSONValue" +/// } +///} +/// ``` +///
+#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] +#[serde(transparent)] +pub struct JsonObject(pub ::std::collections::HashMap<::std::string::String, JsonValue>); +///JsonValue +/// +///
JSON schema +/// +/// ```json +///{ +/// "anyOf": [ +/// { +/// "$ref": "#/$defs/JSONObject" +/// }, +/// { +/// "type": "array", +/// "items": { +/// "$ref": "#/$defs/JSONValue" +/// } +/// }, +/// { +/// "type": [ +/// "string", +/// "integer", +/// "boolean" +/// ] +/// } +/// ] +///} +/// ``` +///
+#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] +#[serde(untagged)] +pub enum JsonValue { + Variant0(JsonObject), + Variant1(::std::vec::Vec), + Variant2(JsonValueVariant2), +} +impl ::std::convert::From for JsonValue { + fn from(value: JsonObject) -> Self { + Self::Variant0(value) + } +} +impl ::std::convert::From<::std::vec::Vec> for JsonValue { + fn from(value: ::std::vec::Vec) -> Self { + Self::Variant1(value) + } +} +impl ::std::convert::From for JsonValue { + fn from(value: JsonValueVariant2) -> Self { + Self::Variant2(value) + } +} +///JsonValueVariant2 +/// +///
JSON schema +/// +/// ```json +///{ +/// "type": [ +/// "string", +/// "integer", +/// "boolean" +/// ] +///} +/// ``` +///
+#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] +#[serde(untagged)] +pub enum JsonValueVariant2 { + Boolean(bool), + String(::std::string::String), + Integer(i64), +} +impl ::std::convert::From for JsonValueVariant2 { + fn from(value: bool) -> Self { + Self::Boolean(value) + } +} +impl ::std::convert::From for JsonValueVariant2 { + fn from(value: i64) -> Self { + Self::Integer(value) + } +} ///A response to a request that indicates an error occurred. /// ///
JSON schema @@ -8382,21 +8490,26 @@ impl ::std::convert::From for SamplingMessageContentBlock { /// "properties": { /// "completions": { /// "description": "Present if the server supports argument autocompletion suggestions.", -/// "type": "object", -/// "additionalProperties": true +/// "$ref": "#/$defs/JSONObject" /// }, /// "experimental": { /// "description": "Experimental, non-standard capabilities that the server supports.", /// "type": "object", /// "additionalProperties": { +/// "$ref": "#/$defs/JSONObject" +/// } +/// }, +/// "extensions": { +/// "description": "Optional MCP extensions that the server supports. Keys are extension identifiers\n(e.g., \"io.modelcontextprotocol/apps\"), and values are per-extension settings\nobjects. An empty object indicates support with no settings.", +/// "type": "object", +/// "additionalProperties": { /// "type": "object", /// "additionalProperties": true /// } /// }, /// "logging": { /// "description": "Present if the server supports sending log messages to the client.", -/// "type": "object", -/// "additionalProperties": true +/// "$ref": "#/$defs/JSONObject" /// }, /// "prompts": { /// "description": "Present if the server offers any prompt templates.", @@ -8428,13 +8541,11 @@ impl ::std::convert::From for SamplingMessageContentBlock { /// "properties": { /// "cancel": { /// "description": "Whether this server supports {@link CancelTaskRequesttasks/cancel}.", -/// "type": "object", -/// "additionalProperties": true +/// "$ref": "#/$defs/JSONObject" /// }, /// "list": { /// "description": "Whether this server supports {@link ListTasksRequesttasks/list}.", -/// "type": "object", -/// "additionalProperties": true +/// "$ref": "#/$defs/JSONObject" /// }, /// "requests": { /// "description": "Specifies which request types can be augmented with tasks.", @@ -8446,8 +8557,7 @@ impl ::std::convert::From for SamplingMessageContentBlock { /// "properties": { /// "call": { /// "description": "Whether the server supports task-augmented {@link CallToolRequesttools/call} requests.", -/// "type": "object", -/// "additionalProperties": true +/// "$ref": "#/$defs/JSONObject" /// } /// } /// } @@ -8473,15 +8583,20 @@ impl ::std::convert::From for SamplingMessageContentBlock { pub struct ServerCapabilities { ///Present if the server supports argument autocompletion suggestions. #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] - pub completions: ::std::option::Option<::serde_json::Map<::std::string::String, ::serde_json::Value>>, + pub completions: ::std::option::Option, ///Experimental, non-standard capabilities that the server supports. #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] - pub experimental: ::std::option::Option< + pub experimental: ::std::option::Option<::std::collections::HashMap<::std::string::String, JsonObject>>, + /**Optional MCP extensions that the server supports. Keys are extension identifiers + (e.g., "io.modelcontextprotocol/apps"), and values are per-extension settings + objects. An empty object indicates support with no settings.*/ + #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + pub extensions: ::std::option::Option< ::std::collections::HashMap<::std::string::String, ::serde_json::Map<::std::string::String, ::serde_json::Value>>, >, ///Present if the server supports sending log messages to the client. #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] - pub logging: ::std::option::Option<::serde_json::Map<::std::string::String, ::serde_json::Value>>, + pub logging: ::std::option::Option, #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] pub prompts: ::std::option::Option, #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] @@ -8786,6 +8901,9 @@ impl ::std::convert::From for ServerRequest { /// "$ref": "#/$defs/CallToolResult" /// }, /// { +/// "$ref": "#/$defs/CreateTaskResult" +/// }, +/// { /// "description": "The result returned for a {@link GetTaskRequesttasks/get} request.", /// "$ref": "#/$defs/GetTaskResult" /// }, @@ -8818,6 +8936,7 @@ pub enum ServerResult { GetPromptResult(GetPromptResult), ListToolsResult(ListToolsResult), CallToolResult(CallToolResult), + CreateTaskResult(CreateTaskResult), GetTaskResult(GetTaskResult), CancelTaskResult(CancelTaskResult), ListTasksResult(ListTasksResult), @@ -8865,6 +8984,11 @@ impl ::std::convert::From for ServerResult { Self::CallToolResult(value) } } +impl ::std::convert::From for ServerResult { + fn from(value: CreateTaskResult) -> Self { + Self::CreateTaskResult(value) + } +} impl ::std::convert::From for ServerResult { fn from(value: GetTaskResult) -> Self { Self::GetTaskResult(value) @@ -8910,8 +9034,7 @@ impl ::std::convert::From for ServerResult { /// "properties": { /// "call": { /// "description": "Whether the server supports task-augmented {@link CallToolRequesttools/call} requests.", -/// "type": "object", -/// "additionalProperties": true +/// "$ref": "#/$defs/JSONObject" /// } /// } /// } @@ -8935,8 +9058,7 @@ pub struct ServerTaskRequest { /// "properties": { /// "call": { /// "description": "Whether the server supports task-augmented {@link CallToolRequesttools/call} requests.", -/// "type": "object", -/// "additionalProperties": true +/// "$ref": "#/$defs/JSONObject" /// } /// } ///} @@ -8946,7 +9068,7 @@ pub struct ServerTaskRequest { pub struct ServerTaskTools { ///Whether the server supports task-augmented {@link CallToolRequesttools/call} requests. #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] - pub call: ::std::option::Option<::serde_json::Map<::std::string::String, ::serde_json::Value>>, + pub call: ::std::option::Option, } ///Present if the server supports task-augmented requests. /// @@ -8959,13 +9081,11 @@ pub struct ServerTaskTools { /// "properties": { /// "cancel": { /// "description": "Whether this server supports {@link CancelTaskRequesttasks/cancel}.", -/// "type": "object", -/// "additionalProperties": true +/// "$ref": "#/$defs/JSONObject" /// }, /// "list": { /// "description": "Whether this server supports {@link ListTasksRequesttasks/list}.", -/// "type": "object", -/// "additionalProperties": true +/// "$ref": "#/$defs/JSONObject" /// }, /// "requests": { /// "description": "Specifies which request types can be augmented with tasks.", @@ -8977,8 +9097,7 @@ pub struct ServerTaskTools { /// "properties": { /// "call": { /// "description": "Whether the server supports task-augmented {@link CallToolRequesttools/call} requests.", -/// "type": "object", -/// "additionalProperties": true +/// "$ref": "#/$defs/JSONObject" /// } /// } /// } @@ -8992,10 +9111,10 @@ pub struct ServerTaskTools { pub struct ServerTasks { ///Whether this server supports {@link CancelTaskRequesttasks/cancel}. #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] - pub cancel: ::std::option::Option<::serde_json::Map<::std::string::String, ::serde_json::Value>>, + pub cancel: ::std::option::Option, ///Whether this server supports {@link ListTasksRequesttasks/list}. #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] - pub list: ::std::option::Option<::serde_json::Map<::std::string::String, ::serde_json::Value>>, + pub list: ::std::option::Option, #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] pub requests: ::std::option::Option, } @@ -10216,8 +10335,7 @@ pub struct TitledSingleSelectEnumSchemaOneOfItem { /// "properties": { /// "type": "object", /// "additionalProperties": { -/// "type": "object", -/// "additionalProperties": true +/// "$ref": "#/$defs/JSONValue" /// } /// }, /// "required": { @@ -10249,8 +10367,7 @@ pub struct TitledSingleSelectEnumSchemaOneOfItem { /// "properties": { /// "type": "object", /// "additionalProperties": { -/// "type": "object", -/// "additionalProperties": true +/// "$ref": "#/$defs/JSONValue" /// } /// }, /// "required": { @@ -10538,8 +10655,7 @@ impl ::std::fmt::Display for ToolExecutionTaskSupport { /// "properties": { /// "type": "object", /// "additionalProperties": { -/// "type": "object", -/// "additionalProperties": true +/// "$ref": "#/$defs/JSONValue" /// } /// }, /// "required": { @@ -10559,9 +10675,7 @@ impl ::std::fmt::Display for ToolExecutionTaskSupport { #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] pub struct ToolInputSchema { #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] - pub properties: ::std::option::Option< - ::std::collections::HashMap<::std::string::String, ::serde_json::Map<::std::string::String, ::serde_json::Value>>, - >, + pub properties: ::std::option::Option<::std::collections::HashMap<::std::string::String, JsonValue>>, #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")] pub required: ::std::vec::Vec<::std::string::String>, #[serde(rename = "$schema", default, skip_serializing_if = "::std::option::Option::is_none")] @@ -10572,12 +10686,7 @@ pub struct ToolInputSchema { impl ToolInputSchema { pub fn new( required: ::std::vec::Vec<::std::string::String>, - properties: ::std::option::Option< - ::std::collections::HashMap< - ::std::string::String, - ::serde_json::Map<::std::string::String, ::serde_json::Value>, - >, - >, + properties: ::std::option::Option<::std::collections::HashMap<::std::string::String, JsonValue>>, schema: ::std::option::Option<::std::string::String>, ) -> Self { Self { @@ -10680,8 +10789,7 @@ Currently restricted to type: "object" at the root level.*/ /// "properties": { /// "type": "object", /// "additionalProperties": { -/// "type": "object", -/// "additionalProperties": true +/// "$ref": "#/$defs/JSONValue" /// } /// }, /// "required": { @@ -10701,9 +10809,7 @@ Currently restricted to type: "object" at the root level.*/ #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)] pub struct ToolOutputSchema { #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] - pub properties: ::std::option::Option< - ::std::collections::HashMap<::std::string::String, ::serde_json::Map<::std::string::String, ::serde_json::Value>>, - >, + pub properties: ::std::option::Option<::std::collections::HashMap<::std::string::String, JsonValue>>, #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")] pub required: ::std::vec::Vec<::std::string::String>, #[serde(rename = "$schema", default, skip_serializing_if = "::std::option::Option::is_none")] @@ -10714,12 +10820,7 @@ pub struct ToolOutputSchema { impl ToolOutputSchema { pub fn new( required: ::std::vec::Vec<::std::string::String>, - properties: ::std::option::Option< - ::std::collections::HashMap< - ::std::string::String, - ::serde_json::Map<::std::string::String, ::serde_json::Value>, - >, - >, + properties: ::std::option::Option<::std::collections::HashMap<::std::string::String, JsonValue>>, schema: ::std::option::Option<::std::string::String>, ) -> Self { Self { @@ -11865,6 +11966,11 @@ impl From for GenericResult { into_result(value) } } +impl From for GenericResult { + fn from(value: CreateTaskResult) -> Self { + into_result(value) + } +} impl From for GenericResult { fn from(value: GetTaskResult) -> Self { into_result(value) diff --git a/src/generated_schema/draft/schema_utils.rs b/src/generated_schema/draft/schema_utils.rs index 2e4eb91..b210d43 100644 --- a/src/generated_schema/draft/schema_utils.rs +++ b/src/generated_schema/draft/schema_utils.rs @@ -65,6 +65,7 @@ fn detect_message_type(value: &serde_json::Value) -> MessageTypes { pub trait RpcMessage: McpMessage { fn request_id(&self) -> Option<&RequestId>; fn jsonrpc(&self) -> &str; + fn method(&self) -> Option<&str>; } pub trait McpMessage { @@ -134,6 +135,14 @@ impl Hash for RequestId { } } +impl core::fmt::Display for RequestId { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + match *self { + RequestId::String(ref s) => write!(f, "{}", s), + RequestId::Integer(i) => write!(f, "{}", i), + } + } +} //*******************// //** ClientMessage **// //*******************// @@ -308,6 +317,15 @@ impl RpcMessage for ClientMessage { ClientMessage::Error(jsonrpc_error) => jsonrpc_error.jsonrpc(), } } + + fn method(&self) -> Option<&str> { + match self { + ClientMessage::Request(client_jsonrpc_request) => Some(client_jsonrpc_request.method()), + ClientMessage::Notification(client_jsonrpc_notification) => Some(client_jsonrpc_notification.method()), + ClientMessage::Response(_) => None, + ClientMessage::Error(_) => None, + } + } } // Implementing the `McpMessage` trait for `ClientMessage` @@ -694,6 +712,17 @@ impl ClientJsonrpcNotification { pub fn is_initialized_notification(&self) -> bool { matches!(self, Self::InitializedNotification(_)) } + + pub fn method(&self) -> &str { + match self { + ClientJsonrpcNotification::CancelledNotification(notification) => notification.method(), + ClientJsonrpcNotification::InitializedNotification(notification) => notification.method(), + ClientJsonrpcNotification::ProgressNotification(notification) => notification.method(), + ClientJsonrpcNotification::TaskStatusNotification(notification) => notification.method(), + ClientJsonrpcNotification::RootsListChangedNotification(notification) => notification.method(), + ClientJsonrpcNotification::CustomNotification(notification) => notification.method.as_str(), + } + } } impl From for NotificationFromClient { @@ -1071,6 +1100,15 @@ impl RpcMessage for ServerMessage { ServerMessage::Error(jsonrpc_error) => jsonrpc_error.jsonrpc(), } } + + fn method(&self) -> Option<&str> { + match self { + ServerMessage::Request(server_jsonrpc_request) => Some(server_jsonrpc_request.method()), + ServerMessage::Notification(server_jsonrpc_notification) => Some(server_jsonrpc_notification.method()), + ServerMessage::Response(_) => None, + ServerMessage::Error(_) => None, + } + } } // Implementing the `McpMessage` trait for `ServerMessage` @@ -1407,6 +1445,21 @@ impl ServerJsonrpcNotification { ServerJsonrpcNotification::CustomNotification(notification) => notification.jsonrpc(), } } + + fn method(&self) -> &str { + match self { + ServerJsonrpcNotification::CancelledNotification(notification) => notification.method(), + ServerJsonrpcNotification::ProgressNotification(notification) => notification.method(), + ServerJsonrpcNotification::ResourceListChangedNotification(notification) => notification.method(), + ServerJsonrpcNotification::ResourceUpdatedNotification(notification) => notification.method(), + ServerJsonrpcNotification::PromptListChangedNotification(notification) => notification.method(), + ServerJsonrpcNotification::ToolListChangedNotification(notification) => notification.method(), + ServerJsonrpcNotification::TaskStatusNotification(notification) => notification.method(), + ServerJsonrpcNotification::LoggingMessageNotification(notification) => notification.method(), + ServerJsonrpcNotification::ElicitationCompleteNotification(notification) => notification.method(), + ServerJsonrpcNotification::CustomNotification(notification) => ¬ification.method, + } + } } /// Formats the ServerJsonrpcNotification as a JSON string. @@ -3160,11 +3213,6 @@ impl From for ResultFromClient { Self::ElicitResult(value) } } -impl From for ResultFromClient { - fn from(value: CreateTaskResult) -> Self { - Self::CreateTaskResult(value) - } -} impl From for MessageFromClient { fn from(value: Result) -> Self { MessageFromClient::ResultFromClient(value.into()) @@ -3205,11 +3253,6 @@ impl From for MessageFromClient { MessageFromClient::ResultFromClient(value.into()) } } -impl From for MessageFromClient { - fn from(value: CreateTaskResult) -> Self { - MessageFromClient::ResultFromClient(value.into()) - } -} impl From for ServerJsonrpcRequest { fn from(value: PingRequest) -> Self { Self::PingRequest(value) @@ -3752,6 +3795,11 @@ impl From for ResultFromServer { Self::CallToolResult(value) } } +impl From for ResultFromServer { + fn from(value: CreateTaskResult) -> Self { + Self::CreateTaskResult(value) + } +} impl From for ResultFromServer { fn from(value: GetTaskResult) -> Self { Self::GetTaskResult(value) @@ -3777,11 +3825,6 @@ impl From for ResultFromServer { Self::CompleteResult(value) } } -impl From for ResultFromServer { - fn from(value: CreateTaskResult) -> Self { - Self::CreateTaskResult(value) - } -} impl From for MessageFromServer { fn from(value: Result) -> Self { MessageFromServer::ResultFromServer(value.into()) @@ -3827,6 +3870,11 @@ impl From for MessageFromServer { MessageFromServer::ResultFromServer(value.into()) } } +impl From for MessageFromServer { + fn from(value: CreateTaskResult) -> Self { + MessageFromServer::ResultFromServer(value.into()) + } +} impl From for MessageFromServer { fn from(value: GetTaskResult) -> Self { MessageFromServer::ResultFromServer(value.into()) @@ -3852,11 +3900,6 @@ impl From for MessageFromServer { MessageFromServer::ResultFromServer(value.into()) } } -impl From for MessageFromServer { - fn from(value: CreateTaskResult) -> Self { - MessageFromServer::ResultFromServer(value.into()) - } -} impl TryFrom for GenericResult { type Error = RpcError; fn try_from(value: ResultFromClient) -> std::result::Result { @@ -3937,16 +3980,6 @@ impl TryFrom for ElicitResult { } } } -impl TryFrom for CreateTaskResult { - type Error = RpcError; - fn try_from(value: ResultFromClient) -> std::result::Result { - if let ResultFromClient::CreateTaskResult(result) = value { - Ok(result) - } else { - Err(RpcError::internal_error().with_message("Not a CreateTaskResult".to_string())) - } - } -} impl TryFrom for GenericResult { type Error = RpcError; fn try_from(value: ResultFromServer) -> std::result::Result { @@ -4037,6 +4070,16 @@ impl TryFrom for CallToolResult { } } } +impl TryFrom for CreateTaskResult { + type Error = RpcError; + fn try_from(value: ResultFromServer) -> std::result::Result { + if let ResultFromServer::CreateTaskResult(result) = value { + Ok(result) + } else { + Err(RpcError::internal_error().with_message("Not a CreateTaskResult".to_string())) + } + } +} impl TryFrom for GetTaskResult { type Error = RpcError; fn try_from(value: ResultFromServer) -> std::result::Result { @@ -4087,16 +4130,6 @@ impl TryFrom for CompleteResult { } } } -impl TryFrom for CreateTaskResult { - type Error = RpcError; - fn try_from(value: ResultFromServer) -> std::result::Result { - if let ResultFromServer::CreateTaskResult(result) = value { - Ok(result) - } else { - Err(RpcError::internal_error().with_message("Not a CreateTaskResult".to_string())) - } - } -} impl ContentBlock { ///Create a ContentBlock::TextContent pub fn text_content(text: ::std::string::String) -> Self { From e9baf88d068547556cc9b043cd698cf5d2d7a3d2 Mon Sep 17 00:00:00 2001 From: Ali Hashemi Date: Tue, 10 Mar 2026 19:18:36 -0300 Subject: [PATCH 2/3] revert temporary change back --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 39c3aa4..3c1da0f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,7 +38,7 @@ features = ["2025_11_25", "schema_utils"] [features] # default features -default = ["2025_03_26", "schema_utils"] # Default features +default = ["2025_11_25", "schema_utils"] # Default features # activates the latest MCP schema version, this will be updated once a new version of schema is published latest = ["2025_11_25"] From c865aecc8459c56c2c48c7994fbfb33d1179cf63 Mon Sep 17 00:00:00 2001 From: Ali Hashemi Date: Tue, 10 Mar 2026 19:23:49 -0300 Subject: [PATCH 3/3] chore: fix typo --- src/generated_schema/2024_11_05/schema_utils.rs | 4 ++-- src/generated_schema/2025_03_26/schema_utils.rs | 4 ++-- src/generated_schema/2025_06_18/schema_utils.rs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/generated_schema/2024_11_05/schema_utils.rs b/src/generated_schema/2024_11_05/schema_utils.rs index 5285f6d..0563fd6 100644 --- a/src/generated_schema/2024_11_05/schema_utils.rs +++ b/src/generated_schema/2024_11_05/schema_utils.rs @@ -248,7 +248,7 @@ impl ClientMessage { /// Returns `true` if the message is an `InitializedNotification` pub fn is_initialized_notification(&self) -> bool { - matches!(self, Self::Notification(notofication) if notofication.notification.is_initialized_notification()) + matches!(self, Self::Notification(notification) if notification.notification.is_initialized_notification()) } } @@ -1339,7 +1339,7 @@ impl MessageFromClient { /// Returns `true` if the message is an `InitializedNotification` pub fn is_initialized_notification(&self) -> bool { - matches!(self, Self::NotificationFromClient(notofication) if notofication.is_initialized_notification()) + matches!(self, Self::NotificationFromClient(notification) if notification.is_initialized_notification()) } } diff --git a/src/generated_schema/2025_03_26/schema_utils.rs b/src/generated_schema/2025_03_26/schema_utils.rs index be6e0c8..9d7b6de 100644 --- a/src/generated_schema/2025_03_26/schema_utils.rs +++ b/src/generated_schema/2025_03_26/schema_utils.rs @@ -247,7 +247,7 @@ impl ClientMessage { /// Returns `true` if the message is an `InitializedNotification` pub fn is_initialized_notification(&self) -> bool { - matches!(self, Self::Notification(notofication) if notofication.notification.is_initialized_notification()) + matches!(self, Self::Notification(notification) if notification.notification.is_initialized_notification()) } } @@ -1338,7 +1338,7 @@ impl MessageFromClient { /// Returns `true` if the message is an `InitializedNotification` pub fn is_initialized_notification(&self) -> bool { - matches!(self, Self::NotificationFromClient(notofication) if notofication.is_initialized_notification()) + matches!(self, Self::NotificationFromClient(notification) if notification.is_initialized_notification()) } } diff --git a/src/generated_schema/2025_06_18/schema_utils.rs b/src/generated_schema/2025_06_18/schema_utils.rs index 56a80a1..058e0f0 100644 --- a/src/generated_schema/2025_06_18/schema_utils.rs +++ b/src/generated_schema/2025_06_18/schema_utils.rs @@ -246,7 +246,7 @@ impl ClientMessage { /// Returns `true` if the message is an `InitializedNotification` pub fn is_initialized_notification(&self) -> bool { - matches!(self, Self::Notification(notofication) if notofication.notification.is_initialized_notification()) + matches!(self, Self::Notification(notification) if notification.notification.is_initialized_notification()) } } @@ -1339,7 +1339,7 @@ impl MessageFromClient { /// Returns `true` if the message is an `InitializedNotification` pub fn is_initialized_notification(&self) -> bool { - matches!(self, Self::NotificationFromClient(notofication) if notofication.is_initialized_notification()) + matches!(self, Self::NotificationFromClient(notification) if notification.is_initialized_notification()) } }