1
1
/// ----------------------------------------------------------------------------
2
- /// This file is auto-generated by mcp-schema-gen v0.1.1 .
2
+ /// This file is auto-generated by mcp-schema-gen v0.1.3 .
3
3
/// WARNING:
4
4
/// It is not recommended to modify this file directly. You are free to
5
5
/// modify or extend the implementations as needed, but please do so at your own risk.
6
6
///
7
7
/// Generated from : <https://github.com/modelcontextprotocol/specification.git>
8
- /// Hash : 55c983fd85fafa458d31f729e433c60e95932178
9
- /// Generated at : 2025-02-11 20:13:30
8
+ /// Hash : 63e1dbb75456b359b9ed8b27d21f4ac68cbb753e
9
+ /// Generated at : 2025-02-14 07:43:44
10
10
/// ----------------------------------------------------------------------------
11
11
///
12
12
/// MCP Protocol Version
@@ -4542,7 +4542,6 @@ pub struct Result {
4542
4542
#[ serde( flatten, default , skip_serializing_if = "::std::option::Option::is_none" ) ]
4543
4543
pub extra : :: std:: option:: Option < :: serde_json:: Map < :: std:: string:: String , :: serde_json:: Value > > ,
4544
4544
}
4545
-
4546
4545
///The sender or recipient of messages and data in a conversation.
4547
4546
///
4548
4547
/// <details><summary>JSON schema</summary>
@@ -5763,6 +5762,7 @@ impl<'de> serde::Deserialize<'de> for ClientRequest {
5763
5762
}
5764
5763
}
5765
5764
impl ClientRequest {
5765
+ #[ deprecated( since = "0.1.4" , note = "Use `method()` instead." ) ]
5766
5766
pub fn get_method ( & self ) -> & str {
5767
5767
match self {
5768
5768
ClientRequest :: InitializeRequest ( request) => request. method ( ) ,
@@ -5780,6 +5780,23 @@ impl ClientRequest {
5780
5780
ClientRequest :: CompleteRequest ( request) => request. method ( ) ,
5781
5781
}
5782
5782
}
5783
+ pub fn method ( & self ) -> & str {
5784
+ match self {
5785
+ ClientRequest :: InitializeRequest ( request) => request. method ( ) ,
5786
+ ClientRequest :: PingRequest ( request) => request. method ( ) ,
5787
+ ClientRequest :: ListResourcesRequest ( request) => request. method ( ) ,
5788
+ ClientRequest :: ListResourceTemplatesRequest ( request) => request. method ( ) ,
5789
+ ClientRequest :: ReadResourceRequest ( request) => request. method ( ) ,
5790
+ ClientRequest :: SubscribeRequest ( request) => request. method ( ) ,
5791
+ ClientRequest :: UnsubscribeRequest ( request) => request. method ( ) ,
5792
+ ClientRequest :: ListPromptsRequest ( request) => request. method ( ) ,
5793
+ ClientRequest :: GetPromptRequest ( request) => request. method ( ) ,
5794
+ ClientRequest :: ListToolsRequest ( request) => request. method ( ) ,
5795
+ ClientRequest :: CallToolRequest ( request) => request. method ( ) ,
5796
+ ClientRequest :: SetLevelRequest ( request) => request. method ( ) ,
5797
+ ClientRequest :: CompleteRequest ( request) => request. method ( ) ,
5798
+ }
5799
+ }
5783
5800
}
5784
5801
/// Implementing the Deserialize trait
5785
5802
/// This allows enum to be deserialized into correct type based on the value of the "method"
@@ -5817,6 +5834,7 @@ impl<'de> serde::Deserialize<'de> for ClientNotification {
5817
5834
}
5818
5835
}
5819
5836
impl ClientNotification {
5837
+ #[ deprecated( since = "0.1.4" , note = "Use `method()` instead." ) ]
5820
5838
pub fn get_method ( & self ) -> & str {
5821
5839
match self {
5822
5840
ClientNotification :: CancelledNotification ( request) => request. method ( ) ,
@@ -5825,6 +5843,14 @@ impl ClientNotification {
5825
5843
ClientNotification :: RootsListChangedNotification ( request) => request. method ( ) ,
5826
5844
}
5827
5845
}
5846
+ pub fn method ( & self ) -> & str {
5847
+ match self {
5848
+ ClientNotification :: CancelledNotification ( request) => request. method ( ) ,
5849
+ ClientNotification :: InitializedNotification ( request) => request. method ( ) ,
5850
+ ClientNotification :: ProgressNotification ( request) => request. method ( ) ,
5851
+ ClientNotification :: RootsListChangedNotification ( request) => request. method ( ) ,
5852
+ }
5853
+ }
5828
5854
}
5829
5855
/// Implementing the Deserialize trait
5830
5856
/// This allows enum to be deserialized into correct type based on the value of the "method"
@@ -5857,13 +5883,21 @@ impl<'de> serde::Deserialize<'de> for ServerRequest {
5857
5883
}
5858
5884
}
5859
5885
impl ServerRequest {
5886
+ #[ deprecated( since = "0.1.4" , note = "Use `method()` instead." ) ]
5860
5887
pub fn get_method ( & self ) -> & str {
5861
5888
match self {
5862
5889
ServerRequest :: PingRequest ( request) => request. method ( ) ,
5863
5890
ServerRequest :: CreateMessageRequest ( request) => request. method ( ) ,
5864
5891
ServerRequest :: ListRootsRequest ( request) => request. method ( ) ,
5865
5892
}
5866
5893
}
5894
+ pub fn method ( & self ) -> & str {
5895
+ match self {
5896
+ ServerRequest :: PingRequest ( request) => request. method ( ) ,
5897
+ ServerRequest :: CreateMessageRequest ( request) => request. method ( ) ,
5898
+ ServerRequest :: ListRootsRequest ( request) => request. method ( ) ,
5899
+ }
5900
+ }
5867
5901
}
5868
5902
/// Implementing the Deserialize trait
5869
5903
/// This allows enum to be deserialized into correct type based on the value of the "method"
@@ -5917,6 +5951,7 @@ impl<'de> serde::Deserialize<'de> for ServerNotification {
5917
5951
}
5918
5952
}
5919
5953
impl ServerNotification {
5954
+ #[ deprecated( since = "0.1.4" , note = "Use `method()` instead." ) ]
5920
5955
pub fn get_method ( & self ) -> & str {
5921
5956
match self {
5922
5957
ServerNotification :: CancelledNotification ( request) => request. method ( ) ,
@@ -5928,4 +5963,15 @@ impl ServerNotification {
5928
5963
ServerNotification :: LoggingMessageNotification ( request) => request. method ( ) ,
5929
5964
}
5930
5965
}
5966
+ pub fn method ( & self ) -> & str {
5967
+ match self {
5968
+ ServerNotification :: CancelledNotification ( request) => request. method ( ) ,
5969
+ ServerNotification :: ProgressNotification ( request) => request. method ( ) ,
5970
+ ServerNotification :: ResourceListChangedNotification ( request) => request. method ( ) ,
5971
+ ServerNotification :: ResourceUpdatedNotification ( request) => request. method ( ) ,
5972
+ ServerNotification :: PromptListChangedNotification ( request) => request. method ( ) ,
5973
+ ServerNotification :: ToolListChangedNotification ( request) => request. method ( ) ,
5974
+ ServerNotification :: LoggingMessageNotification ( request) => request. method ( ) ,
5975
+ }
5976
+ }
5931
5977
}
0 commit comments