Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 50 additions & 4 deletions src/generated_schema/2024_11_05/mcp_schema.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/// ----------------------------------------------------------------------------
/// This file is auto-generated by mcp-schema-gen v0.1.1.
/// This file is auto-generated by mcp-schema-gen v0.1.3.
/// WARNING:
/// It is not recommended to modify this file directly. You are free to
/// modify or extend the implementations as needed, but please do so at your own risk.
///
/// Generated from : <https://github.com/modelcontextprotocol/specification.git>
/// Hash : 55c983fd85fafa458d31f729e433c60e95932178
/// Generated at : 2025-02-11 20:13:30
/// Hash : 63e1dbb75456b359b9ed8b27d21f4ac68cbb753e
/// Generated at : 2025-02-14 07:43:44
/// ----------------------------------------------------------------------------
///
/// MCP Protocol Version
Expand Down Expand Up @@ -4542,7 +4542,6 @@ pub struct Result {
#[serde(flatten, default, skip_serializing_if = "::std::option::Option::is_none")]
pub extra: ::std::option::Option<::serde_json::Map<::std::string::String, ::serde_json::Value>>,
}

///The sender or recipient of messages and data in a conversation.
///
/// <details><summary>JSON schema</summary>
Expand Down Expand Up @@ -5763,6 +5762,7 @@ impl<'de> serde::Deserialize<'de> for ClientRequest {
}
}
impl ClientRequest {
#[deprecated(since = "0.1.4", note = "Use `method()` instead.")]
pub fn get_method(&self) -> &str {
match self {
ClientRequest::InitializeRequest(request) => request.method(),
Expand All @@ -5780,6 +5780,23 @@ impl ClientRequest {
ClientRequest::CompleteRequest(request) => request.method(),
}
}
pub fn method(&self) -> &str {
match self {
ClientRequest::InitializeRequest(request) => request.method(),
ClientRequest::PingRequest(request) => request.method(),
ClientRequest::ListResourcesRequest(request) => request.method(),
ClientRequest::ListResourceTemplatesRequest(request) => request.method(),
ClientRequest::ReadResourceRequest(request) => request.method(),
ClientRequest::SubscribeRequest(request) => request.method(),
ClientRequest::UnsubscribeRequest(request) => request.method(),
ClientRequest::ListPromptsRequest(request) => request.method(),
ClientRequest::GetPromptRequest(request) => request.method(),
ClientRequest::ListToolsRequest(request) => request.method(),
ClientRequest::CallToolRequest(request) => request.method(),
ClientRequest::SetLevelRequest(request) => request.method(),
ClientRequest::CompleteRequest(request) => request.method(),
}
}
}
/// Implementing the Deserialize trait
/// This allows enum to be deserialized into correct type based on the value of the "method"
Expand Down Expand Up @@ -5817,6 +5834,7 @@ impl<'de> serde::Deserialize<'de> for ClientNotification {
}
}
impl ClientNotification {
#[deprecated(since = "0.1.4", note = "Use `method()` instead.")]
pub fn get_method(&self) -> &str {
match self {
ClientNotification::CancelledNotification(request) => request.method(),
Expand All @@ -5825,6 +5843,14 @@ impl ClientNotification {
ClientNotification::RootsListChangedNotification(request) => request.method(),
}
}
pub fn method(&self) -> &str {
match self {
ClientNotification::CancelledNotification(request) => request.method(),
ClientNotification::InitializedNotification(request) => request.method(),
ClientNotification::ProgressNotification(request) => request.method(),
ClientNotification::RootsListChangedNotification(request) => request.method(),
}
}
}
/// Implementing the Deserialize trait
/// This allows enum to be deserialized into correct type based on the value of the "method"
Expand Down Expand Up @@ -5857,13 +5883,21 @@ impl<'de> serde::Deserialize<'de> for ServerRequest {
}
}
impl ServerRequest {
#[deprecated(since = "0.1.4", note = "Use `method()` instead.")]
pub fn get_method(&self) -> &str {
match self {
ServerRequest::PingRequest(request) => request.method(),
ServerRequest::CreateMessageRequest(request) => request.method(),
ServerRequest::ListRootsRequest(request) => request.method(),
}
}
pub fn method(&self) -> &str {
match self {
ServerRequest::PingRequest(request) => request.method(),
ServerRequest::CreateMessageRequest(request) => request.method(),
ServerRequest::ListRootsRequest(request) => request.method(),
}
}
}
/// Implementing the Deserialize trait
/// This allows enum to be deserialized into correct type based on the value of the "method"
Expand Down Expand Up @@ -5917,6 +5951,7 @@ impl<'de> serde::Deserialize<'de> for ServerNotification {
}
}
impl ServerNotification {
#[deprecated(since = "0.1.4", note = "Use `method()` instead.")]
pub fn get_method(&self) -> &str {
match self {
ServerNotification::CancelledNotification(request) => request.method(),
Expand All @@ -5928,4 +5963,15 @@ impl ServerNotification {
ServerNotification::LoggingMessageNotification(request) => request.method(),
}
}
pub fn method(&self) -> &str {
match self {
ServerNotification::CancelledNotification(request) => request.method(),
ServerNotification::ProgressNotification(request) => request.method(),
ServerNotification::ResourceListChangedNotification(request) => request.method(),
ServerNotification::ResourceUpdatedNotification(request) => request.method(),
ServerNotification::PromptListChangedNotification(request) => request.method(),
ServerNotification::ToolListChangedNotification(request) => request.method(),
ServerNotification::LoggingMessageNotification(request) => request.method(),
}
}
}
Loading