Skip to content

Commit fba6895

Browse files
committed
feat: update draft version, add protocol version enum
1 parent 68fce4f commit fba6895

File tree

10 files changed

+120
-379
lines changed

10 files changed

+120
-379
lines changed

examples/mcp_client_handle_message.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -122,18 +122,9 @@ fn handle_message(message_payload: &str) -> std::result::Result<(), AppError> {
122122
ServerResult::ListToolsResult(list_tools_result) => {
123123
dbg!(list_tools_result);
124124
}
125-
#[cfg(any(feature = "2025_03_26", feature = "2024_11_05"))]
126125
ServerResult::CallToolResult(call_tool_result) => {
127126
dbg!(call_tool_result);
128127
}
129-
#[cfg(feature = "draft")]
130-
ServerResult::CallToolUnstructuredResult(call_tool_unstructured_result) => {
131-
dbg!(call_tool_unstructured_result);
132-
}
133-
#[cfg(feature = "draft")]
134-
ServerResult::CallToolStructuredResult(call_tool_structured_result) => {
135-
dbg!(call_tool_structured_result);
136-
}
137128
ServerResult::CompleteResult(complete_result) => {
138129
dbg!(complete_result);
139130
}

src/generated_schema.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,7 @@ pub use mcp_schema::*;
3333
#[cfg(all(feature = "schema_utils", feature = "draft"))]
3434
#[path = "generated_schema/draft/schema_utils.rs"]
3535
pub mod schema_utils;
36+
37+
#[path = "generated_schema/protocol_version.rs"]
38+
mod protocol_version;
39+
pub use protocol_version::*;

src/generated_schema/2024_11_05/mcp_schema.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
///
77
/// Generated from : <https://github.com/modelcontextprotocol/specification.git>
88
/// Hash : UNKNOWN
9-
/// Generated at : 2025-05-20 20:52:14
9+
/// Generated at : 2025-05-26 21:00:00
1010
/// ----------------------------------------------------------------------------
1111
///
1212
/// MCP Protocol Version

src/generated_schema/2024_11_05/schema_utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub enum MessageTypes {
1515
/// Implements the `Display` trait for the `MessageTypes` enum,
1616
/// allowing it to be converted into a human-readable string.
1717
impl Display for MessageTypes {
18-
/// Formats the `MessageTypes` enum variant as a string.
18+
/// Formats the `MessageTypes` enum variant as a string.
1919
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2020
write!(
2121
f,

src/generated_schema/2025_03_26/mcp_schema.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
///
77
/// Generated from : <https://github.com/modelcontextprotocol/specification.git>
88
/// Hash : UNKNOWN
9-
/// Generated at : 2025-05-20 20:52:15
9+
/// Generated at : 2025-05-26 21:00:00
1010
/// ----------------------------------------------------------------------------
1111
///
1212
/// MCP Protocol Version

src/generated_schema/2025_03_26/schema_utils.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1071,7 +1071,6 @@ impl FromStr for ServerJsonrpcResponse {
10711071

10721072
/// To determine standard and custom results from the server side
10731073
/// Custom results (CustomResult) are of type serde_json::Value and can be deserialized into any custom type.
1074-
#[allow(clippy::large_enum_variant)]
10751074
#[derive(::serde::Serialize, Clone, Debug)]
10761075
#[serde(untagged)]
10771076
pub enum ResultFromServer {

0 commit comments

Comments
 (0)