Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 1040b11

Browse files
feat: add protocol version enum, update draft version (#71)
* feat: update draft version, add protocol version enum * chore: update
1 parent 68fce4f commit 1040b11

File tree

9 files changed

+121
-377
lines changed

9 files changed

+121
-377
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:28:07
1010
/// ----------------------------------------------------------------------------
1111
///
1212
/// MCP Protocol Version

‎src/generated_schema/2024_11_05/schema_utils.rs

Lines changed: 2 additions & 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,
@@ -1071,6 +1071,7 @@ 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)]
10741075
#[derive(::serde::Serialize, Clone, Debug)]
10751076
#[serde(untagged)]
10761077
pub enum ResultFromServer {

‎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:28:07
1010
/// ----------------------------------------------------------------------------
1111
///
1212
/// MCP Protocol Version

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /