Skip to content

feat: add associated methods to structs for static values #56

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 22, 2025
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
94 changes: 92 additions & 2 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.11.
/// This file is auto-generated by mcp-schema-gen v0.1.15.
/// 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 : eb4abdf2bb91e0d5afd94510741eadd416982350
/// Generated at : 2025-03-20 17:51:47
/// Generated at : 2025-03-22 09:38:48
/// ----------------------------------------------------------------------------
///
/// MCP Protocol Version
Expand Down Expand Up @@ -184,6 +184,9 @@ impl CallToolRequest {
pub fn method(&self) -> &::std::string::String {
&self.method
}
pub fn method_name() -> ::std::string::String {
"tools/call".to_string()
}
}
///CallToolRequestParams
///
Expand Down Expand Up @@ -369,6 +372,9 @@ impl CancelledNotification {
pub fn method(&self) -> &::std::string::String {
&self.method
}
pub fn method_name() -> ::std::string::String {
"notifications/cancelled".to_string()
}
}
///CancelledNotificationParams
///
Expand Down Expand Up @@ -773,6 +779,9 @@ impl CompleteRequest {
pub fn method(&self) -> &::std::string::String {
&self.method
}
pub fn method_name() -> ::std::string::String {
"completion/complete".to_string()
}
}
///CompleteRequestParams
///
Expand Down Expand Up @@ -1067,6 +1076,9 @@ impl CreateMessageRequest {
pub fn method(&self) -> &::std::string::String {
&self.method
}
pub fn method_name() -> ::std::string::String {
"sampling/createMessage".to_string()
}
}
///CreateMessageRequestParams
///
Expand Down Expand Up @@ -1360,6 +1372,9 @@ impl EmbeddedResource {
pub fn type_(&self) -> &::std::string::String {
&self.type_
}
pub fn type_name() -> ::std::string::String {
"resource".to_string()
}
}
///EmbeddedResourceAnnotations
///
Expand Down Expand Up @@ -1496,6 +1511,9 @@ impl GetPromptRequest {
pub fn method(&self) -> &::std::string::String {
&self.method
}
pub fn method_name() -> ::std::string::String {
"prompts/get".to_string()
}
}
///GetPromptRequestParams
///
Expand Down Expand Up @@ -1649,6 +1667,9 @@ impl ImageContent {
pub fn type_(&self) -> &::std::string::String {
&self.type_
}
pub fn type_name() -> ::std::string::String {
"image".to_string()
}
}
///ImageContentAnnotations
///
Expand Down Expand Up @@ -1768,6 +1789,9 @@ impl InitializeRequest {
pub fn method(&self) -> &::std::string::String {
&self.method
}
pub fn method_name() -> ::std::string::String {
"initialize".to_string()
}
}
///InitializeRequestParams
///
Expand Down Expand Up @@ -1905,6 +1929,9 @@ impl InitializedNotification {
pub fn method(&self) -> &::std::string::String {
&self.method
}
pub fn method_name() -> ::std::string::String {
"notifications/initialized".to_string()
}
}
///InitializedNotificationParams
///
Expand Down Expand Up @@ -2369,6 +2396,9 @@ impl ListPromptsRequest {
pub fn method(&self) -> &::std::string::String {
&self.method
}
pub fn method_name() -> ::std::string::String {
"prompts/list".to_string()
}
}
///ListPromptsRequestParams
///
Expand Down Expand Up @@ -2480,6 +2510,9 @@ impl ListResourceTemplatesRequest {
pub fn method(&self) -> &::std::string::String {
&self.method
}
pub fn method_name() -> ::std::string::String {
"resources/templates/list".to_string()
}
}
///ListResourceTemplatesRequestParams
///
Expand Down Expand Up @@ -2592,6 +2625,9 @@ impl ListResourcesRequest {
pub fn method(&self) -> &::std::string::String {
&self.method
}
pub fn method_name() -> ::std::string::String {
"resources/list".to_string()
}
}
///ListResourcesRequestParams
///
Expand Down Expand Up @@ -2714,6 +2750,9 @@ impl ListRootsRequest {
pub fn method(&self) -> &::std::string::String {
&self.method
}
pub fn method_name() -> ::std::string::String {
"roots/list".to_string()
}
}
///ListRootsRequestParams
///
Expand Down Expand Up @@ -2847,6 +2886,9 @@ impl ListToolsRequest {
pub fn method(&self) -> &::std::string::String {
&self.method
}
pub fn method_name() -> ::std::string::String {
"tools/list".to_string()
}
}
///ListToolsRequestParams
///
Expand Down Expand Up @@ -3025,6 +3067,9 @@ impl LoggingMessageNotification {
pub fn method(&self) -> &::std::string::String {
&self.method
}
pub fn method_name() -> ::std::string::String {
"notifications/message".to_string()
}
}
///LoggingMessageNotificationParams
///
Expand Down Expand Up @@ -3359,6 +3404,9 @@ impl PingRequest {
pub fn method(&self) -> &::std::string::String {
&self.method
}
pub fn method_name() -> ::std::string::String {
"ping".to_string()
}
}
///PingRequestParams
///
Expand Down Expand Up @@ -3468,6 +3516,9 @@ impl ProgressNotification {
pub fn method(&self) -> &::std::string::String {
&self.method
}
pub fn method_name() -> ::std::string::String {
"notifications/progress".to_string()
}
}
///ProgressNotificationParams
///
Expand Down Expand Up @@ -3659,6 +3710,9 @@ impl PromptListChangedNotification {
pub fn method(&self) -> &::std::string::String {
&self.method
}
pub fn method_name() -> ::std::string::String {
"notifications/prompts/list_changed".to_string()
}
}
///PromptListChangedNotificationParams
///
Expand Down Expand Up @@ -3810,6 +3864,9 @@ impl PromptReference {
pub fn type_(&self) -> &::std::string::String {
&self.type_
}
pub fn type_name() -> ::std::string::String {
"ref/prompt".to_string()
}
}
///Sent from the client to the server, to read a specific resource URI.
///
Expand Down Expand Up @@ -3860,6 +3917,9 @@ impl ReadResourceRequest {
pub fn method(&self) -> &::std::string::String {
&self.method
}
pub fn method_name() -> ::std::string::String {
"resources/read".to_string()
}
}
///ReadResourceRequestParams
///
Expand Down Expand Up @@ -4266,6 +4326,9 @@ impl ResourceListChangedNotification {
pub fn method(&self) -> &::std::string::String {
&self.method
}
pub fn method_name() -> ::std::string::String {
"notifications/resources/list_changed".to_string()
}
}
///ResourceListChangedNotificationParams
///
Expand Down Expand Up @@ -4336,6 +4399,9 @@ impl ResourceReference {
pub fn type_(&self) -> &::std::string::String {
&self.type_
}
pub fn type_name() -> ::std::string::String {
"ref/resource".to_string()
}
}
///A template description for resources available on the server.
///
Expand Down Expand Up @@ -4490,6 +4556,9 @@ impl ResourceUpdatedNotification {
pub fn method(&self) -> &::std::string::String {
&self.method
}
pub fn method_name() -> ::std::string::String {
"notifications/resources/updated".to_string()
}
}
///ResourceUpdatedNotificationParams
///
Expand Down Expand Up @@ -4658,6 +4727,9 @@ impl RootsListChangedNotification {
pub fn method(&self) -> &::std::string::String {
&self.method
}
pub fn method_name() -> ::std::string::String {
"notifications/roots/list_changed".to_string()
}
}
///RootsListChangedNotificationParams
///
Expand Down Expand Up @@ -5179,6 +5251,9 @@ impl SetLevelRequest {
pub fn method(&self) -> &::std::string::String {
&self.method
}
pub fn method_name() -> ::std::string::String {
"logging/setLevel".to_string()
}
}
///SetLevelRequestParams
///
Expand Down Expand Up @@ -5253,6 +5328,9 @@ impl SubscribeRequest {
pub fn method(&self) -> &::std::string::String {
&self.method
}
pub fn method_name() -> ::std::string::String {
"resources/subscribe".to_string()
}
}
///SubscribeRequestParams
///
Expand Down Expand Up @@ -5342,6 +5420,9 @@ impl TextContent {
pub fn type_(&self) -> &::std::string::String {
&self.type_
}
pub fn type_name() -> ::std::string::String {
"text".to_string()
}
}
///TextContentAnnotations
///
Expand Down Expand Up @@ -5540,6 +5621,9 @@ impl ToolInputSchema {
pub fn type_(&self) -> &::std::string::String {
&self.type_
}
pub fn type_name() -> ::std::string::String {
"object".to_string()
}
}
///An optional notification from the server to the client, informing it that the list of tools it offers has changed. This may be issued by servers without any previous subscription from the client.
///
Expand Down Expand Up @@ -5588,6 +5672,9 @@ impl ToolListChangedNotification {
pub fn method(&self) -> &::std::string::String {
&self.method
}
pub fn method_name() -> ::std::string::String {
"notifications/tools/list_changed".to_string()
}
}
///ToolListChangedNotificationParams
///
Expand Down Expand Up @@ -5664,6 +5751,9 @@ impl UnsubscribeRequest {
pub fn method(&self) -> &::std::string::String {
&self.method
}
pub fn method_name() -> ::std::string::String {
"resources/unsubscribe".to_string()
}
}
///UnsubscribeRequestParams
///
Expand Down
Loading