mcp_attr/
schema.rs

1#![allow(rustdoc::bare_urls)]
2#![allow(clippy::derivable_impls)]
3#![allow(clippy::clone_on_copy)]
4#![allow(irrefutable_let_patterns)]
5#![allow(missing_docs)]
6
7pub use jsoncall::RequestId;
8/// Error types.
9pub mod error {
10    /// Error from a TryFrom or FromStr implementation.
11    pub struct ConversionError(::std::borrow::Cow<'static, str>);
12    impl ::std::error::Error for ConversionError {}
13    impl ::std::fmt::Display for ConversionError {
14        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> Result<(), ::std::fmt::Error> {
15            ::std::fmt::Display::fmt(&self.0, f)
16        }
17    }
18    impl ::std::fmt::Debug for ConversionError {
19        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> Result<(), ::std::fmt::Error> {
20            ::std::fmt::Debug::fmt(&self.0, f)
21        }
22    }
23    impl From<&'static str> for ConversionError {
24        fn from(value: &'static str) -> Self {
25            Self(value.into())
26        }
27    }
28    impl From<String> for ConversionError {
29        fn from(value: String) -> Self {
30            Self(value.into())
31        }
32    }
33}
34///Base for objects that include optional annotations for the client. The client can use annotations to inform how objects are used or displayed
35///
36/// <details><summary>JSON schema</summary>
37///
38/// ```json
39///{
40///  "description": "Base for objects that include optional annotations for the client. The client can use annotations to inform how objects are used or displayed",
41///  "type": "object",
42///  "properties": {
43///    "annotations": {
44///      "type": "object",
45///      "properties": {
46///        "audience": {
47///          "description": "Describes who the intended customer of this object or data is.\n\nIt can include multiple entries to indicate content useful for multiple audiences (e.g., `[\"user\", \"assistant\"]`).",
48///          "type": "array",
49///          "items": {
50///            "$ref": "#/definitions/Role"
51///          }
52///        },
53///        "priority": {
54///          "description": "Describes how important this data is for operating the server.\n\nA value of 1 means \"most important,\" and indicates that the data is\neffectively required, while 0 means \"least important,\" and indicates that\nthe data is entirely optional.",
55///          "type": "number",
56///          "maximum": 1.0,
57///          "minimum": 0.0
58///        }
59///      }
60///    }
61///  }
62///}
63/// ```
64/// </details>
65#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
66pub struct Annotated {
67    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
68    pub annotations: ::std::option::Option<AnnotatedAnnotations>,
69}
70impl ::std::convert::From<&Annotated> for Annotated {
71    fn from(value: &Annotated) -> Self {
72        value.clone()
73    }
74}
75impl ::std::default::Default for Annotated {
76    fn default() -> Self {
77        Self {
78            annotations: Default::default(),
79        }
80    }
81}
82///AnnotatedAnnotations
83///
84/// <details><summary>JSON schema</summary>
85///
86/// ```json
87///{
88///  "type": "object",
89///  "properties": {
90///    "audience": {
91///      "description": "Describes who the intended customer of this object or data is.\n\nIt can include multiple entries to indicate content useful for multiple audiences (e.g., `[\"user\", \"assistant\"]`).",
92///      "type": "array",
93///      "items": {
94///        "$ref": "#/definitions/Role"
95///      }
96///    },
97///    "priority": {
98///      "description": "Describes how important this data is for operating the server.\n\nA value of 1 means \"most important,\" and indicates that the data is\neffectively required, while 0 means \"least important,\" and indicates that\nthe data is entirely optional.",
99///      "type": "number",
100///      "maximum": 1.0,
101///      "minimum": 0.0
102///    }
103///  }
104///}
105/// ```
106/// </details>
107#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
108pub struct AnnotatedAnnotations {
109    ///Describes who the intended customer of this object or data is.
110    ///
111    ///It can include multiple entries to indicate content useful for multiple audiences (e.g., `["user", "assistant"]`).
112    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
113    pub audience: ::std::vec::Vec<Role>,
114    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
115    pub priority: ::std::option::Option<f64>,
116}
117impl ::std::convert::From<&AnnotatedAnnotations> for AnnotatedAnnotations {
118    fn from(value: &AnnotatedAnnotations) -> Self {
119        value.clone()
120    }
121}
122impl ::std::default::Default for AnnotatedAnnotations {
123    fn default() -> Self {
124        Self {
125            audience: Default::default(),
126            priority: Default::default(),
127        }
128    }
129}
130///BlobResourceContents
131///
132/// <details><summary>JSON schema</summary>
133///
134/// ```json
135///{
136///  "type": "object",
137///  "required": [
138///    "blob",
139///    "uri"
140///  ],
141///  "properties": {
142///    "blob": {
143///      "description": "A base64-encoded string representing the binary data of the item.",
144///      "type": "string",
145///      "format": "byte"
146///    },
147///    "mimeType": {
148///      "description": "The MIME type of this resource, if known.",
149///      "type": "string"
150///    },
151///    "uri": {
152///      "description": "The URI of this resource.",
153///      "type": "string",
154///      "format": "uri"
155///    }
156///  }
157///}
158/// ```
159/// </details>
160#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq, Default)]
161pub struct BlobResourceContents {
162    ///A base64-encoded string representing the binary data of the item.
163    pub blob: crate::utils::Base64Bytes,
164    ///The MIME type of this resource, if known.
165    #[serde(
166        rename = "mimeType",
167        default,
168        skip_serializing_if = "::std::option::Option::is_none"
169    )]
170    pub mime_type: ::std::option::Option<::std::string::String>,
171    ///The URI of this resource.
172    pub uri: ::std::string::String,
173}
174impl ::std::convert::From<&BlobResourceContents> for BlobResourceContents {
175    fn from(value: &BlobResourceContents) -> Self {
176        value.clone()
177    }
178}
179///Used by the client to invoke a tool provided by the server.
180///
181/// <details><summary>JSON schema</summary>
182///
183/// ```json
184///{
185///  "description": "Used by the client to invoke a tool provided by the server.",
186///  "type": "object",
187///  "required": [
188///    "method",
189///    "params"
190///  ],
191///  "properties": {
192///    "method": {
193///      "type": "string",
194///      "const": "tools/call"
195///    },
196///    "params": {
197///      "type": "object",
198///      "required": [
199///        "name"
200///      ],
201///      "properties": {
202///        "arguments": {
203///          "type": "object",
204///          "additionalProperties": {}
205///        },
206///        "name": {
207///          "type": "string"
208///        }
209///      }
210///    }
211///  }
212///}
213/// ```
214/// </details>
215#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
216pub struct CallToolRequest {
217    pub method: ::std::string::String,
218    pub params: CallToolRequestParams,
219}
220impl ::std::convert::From<&CallToolRequest> for CallToolRequest {
221    fn from(value: &CallToolRequest) -> Self {
222        value.clone()
223    }
224}
225///CallToolRequestParams
226///
227/// <details><summary>JSON schema</summary>
228///
229/// ```json
230///{
231///  "type": "object",
232///  "required": [
233///    "name"
234///  ],
235///  "properties": {
236///    "arguments": {
237///      "type": "object",
238///      "additionalProperties": {}
239///    },
240///    "name": {
241///      "type": "string"
242///    }
243///  }
244///}
245/// ```
246/// </details>
247#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
248pub struct CallToolRequestParams {
249    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
250    pub arguments:
251        ::std::option::Option<::serde_json::Map<::std::string::String, ::serde_json::Value>>,
252    pub name: ::std::string::String,
253}
254impl ::std::convert::From<&CallToolRequestParams> for CallToolRequestParams {
255    fn from(value: &CallToolRequestParams) -> Self {
256        value.clone()
257    }
258}
259///The server's response to a tool call.
260///
261///Any errors that originate from the tool SHOULD be reported inside the result
262///object, with `isError` set to true, _not_ as an MCP protocol-level error
263///response. Otherwise, the LLM would not be able to see that an error occurred
264///and self-correct.
265///
266///However, any errors in _finding_ the tool, an error indicating that the
267///server does not support tool calls, or any other exceptional conditions,
268///should be reported as an MCP error response.
269///
270/// <details><summary>JSON schema</summary>
271///
272/// ```json
273///{
274///  "description": "The server's response to a tool call.\n\nAny errors that originate from the tool SHOULD be reported inside the result\nobject, with `isError` set to true, _not_ as an MCP protocol-level error\nresponse. Otherwise, the LLM would not be able to see that an error occurred\nand self-correct.\n\nHowever, any errors in _finding_ the tool, an error indicating that the\nserver does not support tool calls, or any other exceptional conditions,\nshould be reported as an MCP error response.",
275///  "type": "object",
276///  "required": [
277///    "content"
278///  ],
279///  "properties": {
280///    "_meta": {
281///      "description": "This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses.",
282///      "type": "object",
283///      "additionalProperties": {}
284///    },
285///    "content": {
286///      "type": "array",
287///      "items": {
288///        "anyOf": [
289///          {
290///            "$ref": "#/definitions/TextContent"
291///          },
292///          {
293///            "$ref": "#/definitions/ImageContent"
294///          },
295///          {
296///            "$ref": "#/definitions/EmbeddedResource"
297///          }
298///        ]
299///      }
300///    },
301///    "isError": {
302///      "description": "Whether the tool call ended in an error.\n\nIf not set, this is assumed to be false (the call was successful).",
303///      "type": "boolean"
304///    }
305///  }
306///}
307/// ```
308/// </details>
309#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
310pub struct CallToolResult {
311    pub content: ::std::vec::Vec<CallToolResultContentItem>,
312    ///Whether the tool call ended in an error.
313    ///
314    ///If not set, this is assumed to be false (the call was successful).
315    #[serde(
316        rename = "isError",
317        default,
318        skip_serializing_if = "::std::option::Option::is_none"
319    )]
320    pub is_error: ::std::option::Option<bool>,
321    ///This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses.
322    #[serde(
323        rename = "_meta",
324        default,
325        skip_serializing_if = "::serde_json::Map::is_empty"
326    )]
327    pub meta: ::serde_json::Map<::std::string::String, ::serde_json::Value>,
328}
329impl ::std::convert::From<&CallToolResult> for CallToolResult {
330    fn from(value: &CallToolResult) -> Self {
331        value.clone()
332    }
333}
334///CallToolResultContentItem
335///
336/// <details><summary>JSON schema</summary>
337///
338/// ```json
339///{
340///  "anyOf": [
341///    {
342///      "$ref": "#/definitions/TextContent"
343///    },
344///    {
345///      "$ref": "#/definitions/ImageContent"
346///    },
347///    {
348///      "$ref": "#/definitions/EmbeddedResource"
349///    }
350///  ]
351///}
352/// ```
353/// </details>
354#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
355#[serde(untagged)]
356pub enum CallToolResultContentItem {
357    TextContent(TextContent),
358    ImageContent(ImageContent),
359    EmbeddedResource(EmbeddedResource),
360}
361impl ::std::convert::From<&Self> for CallToolResultContentItem {
362    fn from(value: &CallToolResultContentItem) -> Self {
363        value.clone()
364    }
365}
366impl ::std::convert::From<TextContent> for CallToolResultContentItem {
367    fn from(value: TextContent) -> Self {
368        Self::TextContent(value)
369    }
370}
371impl ::std::convert::From<ImageContent> for CallToolResultContentItem {
372    fn from(value: ImageContent) -> Self {
373        Self::ImageContent(value)
374    }
375}
376impl ::std::convert::From<EmbeddedResource> for CallToolResultContentItem {
377    fn from(value: EmbeddedResource) -> Self {
378        Self::EmbeddedResource(value)
379    }
380}
381///This notification can be sent by either side to indicate that it is cancelling a previously-issued request.
382///
383///The request SHOULD still be in-flight, but due to communication latency, it is always possible that this notification MAY arrive after the request has already finished.
384///
385///This notification indicates that the result will be unused, so any associated processing SHOULD cease.
386///
387///A client MUST NOT attempt to cancel its `initialize` request.
388///
389/// <details><summary>JSON schema</summary>
390///
391/// ```json
392///{
393///  "description": "This notification can be sent by either side to indicate that it is cancelling a previously-issued request.\n\nThe request SHOULD still be in-flight, but due to communication latency, it is always possible that this notification MAY arrive after the request has already finished.\n\nThis notification indicates that the result will be unused, so any associated processing SHOULD cease.\n\nA client MUST NOT attempt to cancel its `initialize` request.",
394///  "type": "object",
395///  "required": [
396///    "method",
397///    "params"
398///  ],
399///  "properties": {
400///    "method": {
401///      "type": "string",
402///      "const": "notifications/cancelled"
403///    },
404///    "params": {
405///      "type": "object",
406///      "required": [
407///        "requestId"
408///      ],
409///      "properties": {
410///        "reason": {
411///          "description": "An optional string describing the reason for the cancellation. This MAY be logged or presented to the user.",
412///          "type": "string"
413///        },
414///        "requestId": {
415///          "description": "The ID of the request to cancel.\n\nThis MUST correspond to the ID of a request previously issued in the same direction.",
416///          "$ref": "#/definitions/RequestId"
417///        }
418///      }
419///    }
420///  }
421///}
422/// ```
423/// </details>
424#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
425pub struct CancelledNotification {
426    pub method: ::std::string::String,
427    pub params: CancelledNotificationParams,
428}
429impl ::std::convert::From<&CancelledNotification> for CancelledNotification {
430    fn from(value: &CancelledNotification) -> Self {
431        value.clone()
432    }
433}
434///CancelledNotificationParams
435///
436/// <details><summary>JSON schema</summary>
437///
438/// ```json
439///{
440///  "type": "object",
441///  "required": [
442///    "requestId"
443///  ],
444///  "properties": {
445///    "reason": {
446///      "description": "An optional string describing the reason for the cancellation. This MAY be logged or presented to the user.",
447///      "type": "string"
448///    },
449///    "requestId": {
450///      "description": "The ID of the request to cancel.\n\nThis MUST correspond to the ID of a request previously issued in the same direction.",
451///      "$ref": "#/definitions/RequestId"
452///    }
453///  }
454///}
455/// ```
456/// </details>
457#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
458pub struct CancelledNotificationParams {
459    ///An optional string describing the reason for the cancellation. This MAY be logged or presented to the user.
460    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
461    pub reason: ::std::option::Option<::std::string::String>,
462    ///The ID of the request to cancel.
463    ///
464    ///This MUST correspond to the ID of a request previously issued in the same direction.
465    #[serde(rename = "requestId")]
466    pub request_id: RequestId,
467}
468impl ::std::convert::From<&CancelledNotificationParams> for CancelledNotificationParams {
469    fn from(value: &CancelledNotificationParams) -> Self {
470        value.clone()
471    }
472}
473///Capabilities a client may support. Known capabilities are defined here, in this schema, but this is not a closed set: any client can define its own, additional capabilities.
474///
475/// <details><summary>JSON schema</summary>
476///
477/// ```json
478///{
479///  "description": "Capabilities a client may support. Known capabilities are defined here, in this schema, but this is not a closed set: any client can define its own, additional capabilities.",
480///  "type": "object",
481///  "properties": {
482///    "experimental": {
483///      "description": "Experimental, non-standard capabilities that the client supports.",
484///      "type": "object",
485///      "additionalProperties": {
486///        "type": "object",
487///        "additionalProperties": true
488///      }
489///    },
490///    "roots": {
491///      "description": "Present if the client supports listing roots.",
492///      "type": "object",
493///      "properties": {
494///        "listChanged": {
495///          "description": "Whether the client supports notifications for changes to the roots list.",
496///          "type": "boolean"
497///        }
498///      }
499///    },
500///    "sampling": {
501///      "description": "Present if the client supports sampling from an LLM.",
502///      "type": "object",
503///      "additionalProperties": true
504///    }
505///  }
506///}
507/// ```
508/// </details>
509#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
510pub struct ClientCapabilities {
511    ///Experimental, non-standard capabilities that the client supports.
512    #[serde(
513        default,
514        skip_serializing_if = ":: std :: collections :: BTreeMap::is_empty"
515    )]
516    pub experimental: ::std::collections::BTreeMap<
517        ::std::string::String,
518        ::serde_json::Map<::std::string::String, ::serde_json::Value>,
519    >,
520    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
521    pub roots: ::std::option::Option<ClientCapabilitiesRoots>,
522    ///Present if the client supports sampling from an LLM.
523    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
524    pub sampling:
525        ::std::option::Option<::serde_json::Map<::std::string::String, ::serde_json::Value>>,
526}
527impl ::std::convert::From<&ClientCapabilities> for ClientCapabilities {
528    fn from(value: &ClientCapabilities) -> Self {
529        value.clone()
530    }
531}
532impl ::std::default::Default for ClientCapabilities {
533    fn default() -> Self {
534        Self {
535            experimental: Default::default(),
536            roots: Default::default(),
537            sampling: Default::default(),
538        }
539    }
540}
541///Present if the client supports listing roots.
542///
543/// <details><summary>JSON schema</summary>
544///
545/// ```json
546///{
547///  "description": "Present if the client supports listing roots.",
548///  "type": "object",
549///  "properties": {
550///    "listChanged": {
551///      "description": "Whether the client supports notifications for changes to the roots list.",
552///      "type": "boolean"
553///    }
554///  }
555///}
556/// ```
557/// </details>
558#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
559pub struct ClientCapabilitiesRoots {
560    ///Whether the client supports notifications for changes to the roots list.
561    #[serde(
562        rename = "listChanged",
563        default,
564        skip_serializing_if = "::std::option::Option::is_none"
565    )]
566    pub list_changed: ::std::option::Option<bool>,
567}
568impl ::std::convert::From<&ClientCapabilitiesRoots> for ClientCapabilitiesRoots {
569    fn from(value: &ClientCapabilitiesRoots) -> Self {
570        value.clone()
571    }
572}
573impl ::std::default::Default for ClientCapabilitiesRoots {
574    fn default() -> Self {
575        Self {
576            list_changed: Default::default(),
577        }
578    }
579}
580///ClientNotification
581///
582/// <details><summary>JSON schema</summary>
583///
584/// ```json
585///{
586///  "anyOf": [
587///    {
588///      "$ref": "#/definitions/CancelledNotification"
589///    },
590///    {
591///      "$ref": "#/definitions/InitializedNotification"
592///    },
593///    {
594///      "$ref": "#/definitions/ProgressNotification"
595///    },
596///    {
597///      "$ref": "#/definitions/RootsListChangedNotification"
598///    }
599///  ]
600///}
601/// ```
602/// </details>
603#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
604#[serde(untagged)]
605pub enum ClientNotification {
606    CancelledNotification(CancelledNotification),
607    InitializedNotification(InitializedNotification),
608    ProgressNotification(ProgressNotification),
609    RootsListChangedNotification(RootsListChangedNotification),
610}
611impl ::std::convert::From<&Self> for ClientNotification {
612    fn from(value: &ClientNotification) -> Self {
613        value.clone()
614    }
615}
616impl ::std::convert::From<CancelledNotification> for ClientNotification {
617    fn from(value: CancelledNotification) -> Self {
618        Self::CancelledNotification(value)
619    }
620}
621impl ::std::convert::From<InitializedNotification> for ClientNotification {
622    fn from(value: InitializedNotification) -> Self {
623        Self::InitializedNotification(value)
624    }
625}
626impl ::std::convert::From<ProgressNotification> for ClientNotification {
627    fn from(value: ProgressNotification) -> Self {
628        Self::ProgressNotification(value)
629    }
630}
631impl ::std::convert::From<RootsListChangedNotification> for ClientNotification {
632    fn from(value: RootsListChangedNotification) -> Self {
633        Self::RootsListChangedNotification(value)
634    }
635}
636///ClientRequest
637///
638/// <details><summary>JSON schema</summary>
639///
640/// ```json
641///{
642///  "anyOf": [
643///    {
644///      "$ref": "#/definitions/InitializeRequest"
645///    },
646///    {
647///      "$ref": "#/definitions/PingRequest"
648///    },
649///    {
650///      "$ref": "#/definitions/ListResourcesRequest"
651///    },
652///    {
653///      "$ref": "#/definitions/ListResourceTemplatesRequest"
654///    },
655///    {
656///      "$ref": "#/definitions/ReadResourceRequest"
657///    },
658///    {
659///      "$ref": "#/definitions/SubscribeRequest"
660///    },
661///    {
662///      "$ref": "#/definitions/UnsubscribeRequest"
663///    },
664///    {
665///      "$ref": "#/definitions/ListPromptsRequest"
666///    },
667///    {
668///      "$ref": "#/definitions/GetPromptRequest"
669///    },
670///    {
671///      "$ref": "#/definitions/ListToolsRequest"
672///    },
673///    {
674///      "$ref": "#/definitions/CallToolRequest"
675///    },
676///    {
677///      "$ref": "#/definitions/SetLevelRequest"
678///    },
679///    {
680///      "$ref": "#/definitions/CompleteRequest"
681///    }
682///  ]
683///}
684/// ```
685/// </details>
686#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
687#[serde(untagged)]
688pub enum ClientRequest {
689    InitializeRequest(InitializeRequest),
690    PingRequest(PingRequest),
691    ListResourcesRequest(ListResourcesRequest),
692    ListResourceTemplatesRequest(ListResourceTemplatesRequest),
693    ReadResourceRequest(ReadResourceRequest),
694    SubscribeRequest(SubscribeRequest),
695    UnsubscribeRequest(UnsubscribeRequest),
696    ListPromptsRequest(ListPromptsRequest),
697    GetPromptRequest(GetPromptRequest),
698    ListToolsRequest(ListToolsRequest),
699    CallToolRequest(CallToolRequest),
700    SetLevelRequest(SetLevelRequest),
701    CompleteRequest(CompleteRequest),
702}
703impl ::std::convert::From<&Self> for ClientRequest {
704    fn from(value: &ClientRequest) -> Self {
705        value.clone()
706    }
707}
708impl ::std::convert::From<InitializeRequest> for ClientRequest {
709    fn from(value: InitializeRequest) -> Self {
710        Self::InitializeRequest(value)
711    }
712}
713impl ::std::convert::From<PingRequest> for ClientRequest {
714    fn from(value: PingRequest) -> Self {
715        Self::PingRequest(value)
716    }
717}
718impl ::std::convert::From<ListResourcesRequest> for ClientRequest {
719    fn from(value: ListResourcesRequest) -> Self {
720        Self::ListResourcesRequest(value)
721    }
722}
723impl ::std::convert::From<ListResourceTemplatesRequest> for ClientRequest {
724    fn from(value: ListResourceTemplatesRequest) -> Self {
725        Self::ListResourceTemplatesRequest(value)
726    }
727}
728impl ::std::convert::From<ReadResourceRequest> for ClientRequest {
729    fn from(value: ReadResourceRequest) -> Self {
730        Self::ReadResourceRequest(value)
731    }
732}
733impl ::std::convert::From<SubscribeRequest> for ClientRequest {
734    fn from(value: SubscribeRequest) -> Self {
735        Self::SubscribeRequest(value)
736    }
737}
738impl ::std::convert::From<UnsubscribeRequest> for ClientRequest {
739    fn from(value: UnsubscribeRequest) -> Self {
740        Self::UnsubscribeRequest(value)
741    }
742}
743impl ::std::convert::From<ListPromptsRequest> for ClientRequest {
744    fn from(value: ListPromptsRequest) -> Self {
745        Self::ListPromptsRequest(value)
746    }
747}
748impl ::std::convert::From<GetPromptRequest> for ClientRequest {
749    fn from(value: GetPromptRequest) -> Self {
750        Self::GetPromptRequest(value)
751    }
752}
753impl ::std::convert::From<ListToolsRequest> for ClientRequest {
754    fn from(value: ListToolsRequest) -> Self {
755        Self::ListToolsRequest(value)
756    }
757}
758impl ::std::convert::From<CallToolRequest> for ClientRequest {
759    fn from(value: CallToolRequest) -> Self {
760        Self::CallToolRequest(value)
761    }
762}
763impl ::std::convert::From<SetLevelRequest> for ClientRequest {
764    fn from(value: SetLevelRequest) -> Self {
765        Self::SetLevelRequest(value)
766    }
767}
768impl ::std::convert::From<CompleteRequest> for ClientRequest {
769    fn from(value: CompleteRequest) -> Self {
770        Self::CompleteRequest(value)
771    }
772}
773///ClientResult
774///
775/// <details><summary>JSON schema</summary>
776///
777/// ```json
778///{
779///  "anyOf": [
780///    {
781///      "$ref": "#/definitions/Result"
782///    },
783///    {
784///      "$ref": "#/definitions/CreateMessageResult"
785///    },
786///    {
787///      "$ref": "#/definitions/ListRootsResult"
788///    }
789///  ]
790///}
791/// ```
792/// </details>
793#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
794#[serde(untagged)]
795pub enum ClientResult {
796    Result(Result),
797    CreateMessageResult(CreateMessageResult),
798    ListRootsResult(ListRootsResult),
799}
800impl ::std::convert::From<&Self> for ClientResult {
801    fn from(value: &ClientResult) -> Self {
802        value.clone()
803    }
804}
805impl ::std::convert::From<Result> for ClientResult {
806    fn from(value: Result) -> Self {
807        Self::Result(value)
808    }
809}
810impl ::std::convert::From<CreateMessageResult> for ClientResult {
811    fn from(value: CreateMessageResult) -> Self {
812        Self::CreateMessageResult(value)
813    }
814}
815impl ::std::convert::From<ListRootsResult> for ClientResult {
816    fn from(value: ListRootsResult) -> Self {
817        Self::ListRootsResult(value)
818    }
819}
820///A request from the client to the server, to ask for completion options.
821///
822/// <details><summary>JSON schema</summary>
823///
824/// ```json
825///{
826///  "description": "A request from the client to the server, to ask for completion options.",
827///  "type": "object",
828///  "required": [
829///    "method",
830///    "params"
831///  ],
832///  "properties": {
833///    "method": {
834///      "type": "string",
835///      "const": "completion/complete"
836///    },
837///    "params": {
838///      "type": "object",
839///      "required": [
840///        "argument",
841///        "ref"
842///      ],
843///      "properties": {
844///        "argument": {
845///          "description": "The argument's information",
846///          "type": "object",
847///          "required": [
848///            "name",
849///            "value"
850///          ],
851///          "properties": {
852///            "name": {
853///              "description": "The name of the argument",
854///              "type": "string"
855///            },
856///            "value": {
857///              "description": "The value of the argument to use for completion matching.",
858///              "type": "string"
859///            }
860///          }
861///        },
862///        "ref": {
863///          "anyOf": [
864///            {
865///              "$ref": "#/definitions/PromptReference"
866///            },
867///            {
868///              "$ref": "#/definitions/ResourceReference"
869///            }
870///          ]
871///        }
872///      }
873///    }
874///  }
875///}
876/// ```
877/// </details>
878#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
879pub struct CompleteRequest {
880    pub method: ::std::string::String,
881    pub params: CompleteRequestParams,
882}
883impl ::std::convert::From<&CompleteRequest> for CompleteRequest {
884    fn from(value: &CompleteRequest) -> Self {
885        value.clone()
886    }
887}
888///CompleteRequestParams
889///
890/// <details><summary>JSON schema</summary>
891///
892/// ```json
893///{
894///  "type": "object",
895///  "required": [
896///    "argument",
897///    "ref"
898///  ],
899///  "properties": {
900///    "argument": {
901///      "description": "The argument's information",
902///      "type": "object",
903///      "required": [
904///        "name",
905///        "value"
906///      ],
907///      "properties": {
908///        "name": {
909///          "description": "The name of the argument",
910///          "type": "string"
911///        },
912///        "value": {
913///          "description": "The value of the argument to use for completion matching.",
914///          "type": "string"
915///        }
916///      }
917///    },
918///    "ref": {
919///      "anyOf": [
920///        {
921///          "$ref": "#/definitions/PromptReference"
922///        },
923///        {
924///          "$ref": "#/definitions/ResourceReference"
925///        }
926///      ]
927///    }
928///  }
929///}
930/// ```
931/// </details>
932#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
933pub struct CompleteRequestParams {
934    pub argument: CompleteRequestParamsArgument,
935    #[serde(rename = "ref")]
936    pub ref_: CompleteRequestParamsRef,
937}
938impl ::std::convert::From<&CompleteRequestParams> for CompleteRequestParams {
939    fn from(value: &CompleteRequestParams) -> Self {
940        value.clone()
941    }
942}
943///The argument's information
944///
945/// <details><summary>JSON schema</summary>
946///
947/// ```json
948///{
949///  "description": "The argument's information",
950///  "type": "object",
951///  "required": [
952///    "name",
953///    "value"
954///  ],
955///  "properties": {
956///    "name": {
957///      "description": "The name of the argument",
958///      "type": "string"
959///    },
960///    "value": {
961///      "description": "The value of the argument to use for completion matching.",
962///      "type": "string"
963///    }
964///  }
965///}
966/// ```
967/// </details>
968#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
969pub struct CompleteRequestParamsArgument {
970    ///The name of the argument
971    pub name: ::std::string::String,
972    ///The value of the argument to use for completion matching.
973    pub value: ::std::string::String,
974}
975impl ::std::convert::From<&CompleteRequestParamsArgument> for CompleteRequestParamsArgument {
976    fn from(value: &CompleteRequestParamsArgument) -> Self {
977        value.clone()
978    }
979}
980///CompleteRequestParamsRef
981///
982/// <details><summary>JSON schema</summary>
983///
984/// ```json
985///{
986///  "anyOf": [
987///    {
988///      "$ref": "#/definitions/PromptReference"
989///    },
990///    {
991///      "$ref": "#/definitions/ResourceReference"
992///    }
993///  ]
994///}
995/// ```
996/// </details>
997#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
998#[serde(untagged)]
999pub enum CompleteRequestParamsRef {
1000    PromptReference(PromptReference),
1001    ResourceReference(ResourceReference),
1002}
1003impl ::std::convert::From<&Self> for CompleteRequestParamsRef {
1004    fn from(value: &CompleteRequestParamsRef) -> Self {
1005        value.clone()
1006    }
1007}
1008impl ::std::convert::From<PromptReference> for CompleteRequestParamsRef {
1009    fn from(value: PromptReference) -> Self {
1010        Self::PromptReference(value)
1011    }
1012}
1013impl ::std::convert::From<ResourceReference> for CompleteRequestParamsRef {
1014    fn from(value: ResourceReference) -> Self {
1015        Self::ResourceReference(value)
1016    }
1017}
1018///The server's response to a completion/complete request
1019///
1020/// <details><summary>JSON schema</summary>
1021///
1022/// ```json
1023///{
1024///  "description": "The server's response to a completion/complete request",
1025///  "type": "object",
1026///  "required": [
1027///    "completion"
1028///  ],
1029///  "properties": {
1030///    "_meta": {
1031///      "description": "This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses.",
1032///      "type": "object",
1033///      "additionalProperties": {}
1034///    },
1035///    "completion": {
1036///      "type": "object",
1037///      "required": [
1038///        "values"
1039///      ],
1040///      "properties": {
1041///        "hasMore": {
1042///          "description": "Indicates whether there are additional completion options beyond those provided in the current response, even if the exact total is unknown.",
1043///          "type": "boolean"
1044///        },
1045///        "total": {
1046///          "description": "The total number of completion options available. This can exceed the number of values actually sent in the response.",
1047///          "type": "integer"
1048///        },
1049///        "values": {
1050///          "description": "An array of completion values. Must not exceed 100 items.",
1051///          "type": "array",
1052///          "items": {
1053///            "type": "string"
1054///          }
1055///        }
1056///      }
1057///    }
1058///  }
1059///}
1060/// ```
1061/// </details>
1062#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq, Default)]
1063pub struct CompleteResult {
1064    pub completion: CompleteResultCompletion,
1065    ///This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses.
1066    #[serde(
1067        rename = "_meta",
1068        default,
1069        skip_serializing_if = "::serde_json::Map::is_empty"
1070    )]
1071    pub meta: ::serde_json::Map<::std::string::String, ::serde_json::Value>,
1072}
1073impl ::std::convert::From<&CompleteResult> for CompleteResult {
1074    fn from(value: &CompleteResult) -> Self {
1075        value.clone()
1076    }
1077}
1078///CompleteResultCompletion
1079///
1080/// <details><summary>JSON schema</summary>
1081///
1082/// ```json
1083///{
1084///  "type": "object",
1085///  "required": [
1086///    "values"
1087///  ],
1088///  "properties": {
1089///    "hasMore": {
1090///      "description": "Indicates whether there are additional completion options beyond those provided in the current response, even if the exact total is unknown.",
1091///      "type": "boolean"
1092///    },
1093///    "total": {
1094///      "description": "The total number of completion options available. This can exceed the number of values actually sent in the response.",
1095///      "type": "integer"
1096///    },
1097///    "values": {
1098///      "description": "An array of completion values. Must not exceed 100 items.",
1099///      "type": "array",
1100///      "items": {
1101///        "type": "string"
1102///      }
1103///    }
1104///  }
1105///}
1106/// ```
1107/// </details>
1108#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq, Default)]
1109pub struct CompleteResultCompletion {
1110    ///Indicates whether there are additional completion options beyond those provided in the current response, even if the exact total is unknown.
1111    #[serde(
1112        rename = "hasMore",
1113        default,
1114        skip_serializing_if = "::std::option::Option::is_none"
1115    )]
1116    pub has_more: ::std::option::Option<bool>,
1117    ///The total number of completion options available. This can exceed the number of values actually sent in the response.
1118    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1119    pub total: ::std::option::Option<i64>,
1120    ///An array of completion values. Must not exceed 100 items.
1121    pub values: ::std::vec::Vec<::std::string::String>,
1122}
1123impl ::std::convert::From<&CompleteResultCompletion> for CompleteResultCompletion {
1124    fn from(value: &CompleteResultCompletion) -> Self {
1125        value.clone()
1126    }
1127}
1128///A request from the server to sample an LLM via the client. The client has full discretion over which model to select. The client should also inform the user before beginning sampling, to allow them to inspect the request (human in the loop) and decide whether to approve it.
1129///
1130/// <details><summary>JSON schema</summary>
1131///
1132/// ```json
1133///{
1134///  "description": "A request from the server to sample an LLM via the client. The client has full discretion over which model to select. The client should also inform the user before beginning sampling, to allow them to inspect the request (human in the loop) and decide whether to approve it.",
1135///  "type": "object",
1136///  "required": [
1137///    "method",
1138///    "params"
1139///  ],
1140///  "properties": {
1141///    "method": {
1142///      "type": "string",
1143///      "const": "sampling/createMessage"
1144///    },
1145///    "params": {
1146///      "type": "object",
1147///      "required": [
1148///        "maxTokens",
1149///        "messages"
1150///      ],
1151///      "properties": {
1152///        "includeContext": {
1153///          "description": "A request to include context from one or more MCP servers (including the caller), to be attached to the prompt. The client MAY ignore this request.",
1154///          "type": "string",
1155///          "enum": [
1156///            "allServers",
1157///            "none",
1158///            "thisServer"
1159///          ]
1160///        },
1161///        "maxTokens": {
1162///          "description": "The maximum number of tokens to sample, as requested by the server. The client MAY choose to sample fewer tokens than requested.",
1163///          "type": "integer"
1164///        },
1165///        "messages": {
1166///          "type": "array",
1167///          "items": {
1168///            "$ref": "#/definitions/SamplingMessage"
1169///          }
1170///        },
1171///        "metadata": {
1172///          "description": "Optional metadata to pass through to the LLM provider. The format of this metadata is provider-specific.",
1173///          "type": "object",
1174///          "additionalProperties": true
1175///        },
1176///        "modelPreferences": {
1177///          "description": "The server's preferences for which model to select. The client MAY ignore these preferences.",
1178///          "$ref": "#/definitions/ModelPreferences"
1179///        },
1180///        "stopSequences": {
1181///          "type": "array",
1182///          "items": {
1183///            "type": "string"
1184///          }
1185///        },
1186///        "systemPrompt": {
1187///          "description": "An optional system prompt the server wants to use for sampling. The client MAY modify or omit this prompt.",
1188///          "type": "string"
1189///        },
1190///        "temperature": {
1191///          "type": "number"
1192///        }
1193///      }
1194///    }
1195///  }
1196///}
1197/// ```
1198/// </details>
1199#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
1200pub struct CreateMessageRequest {
1201    pub method: ::std::string::String,
1202    pub params: CreateMessageRequestParams,
1203}
1204impl ::std::convert::From<&CreateMessageRequest> for CreateMessageRequest {
1205    fn from(value: &CreateMessageRequest) -> Self {
1206        value.clone()
1207    }
1208}
1209///CreateMessageRequestParams
1210///
1211/// <details><summary>JSON schema</summary>
1212///
1213/// ```json
1214///{
1215///  "type": "object",
1216///  "required": [
1217///    "maxTokens",
1218///    "messages"
1219///  ],
1220///  "properties": {
1221///    "includeContext": {
1222///      "description": "A request to include context from one or more MCP servers (including the caller), to be attached to the prompt. The client MAY ignore this request.",
1223///      "type": "string",
1224///      "enum": [
1225///        "allServers",
1226///        "none",
1227///        "thisServer"
1228///      ]
1229///    },
1230///    "maxTokens": {
1231///      "description": "The maximum number of tokens to sample, as requested by the server. The client MAY choose to sample fewer tokens than requested.",
1232///      "type": "integer"
1233///    },
1234///    "messages": {
1235///      "type": "array",
1236///      "items": {
1237///        "$ref": "#/definitions/SamplingMessage"
1238///      }
1239///    },
1240///    "metadata": {
1241///      "description": "Optional metadata to pass through to the LLM provider. The format of this metadata is provider-specific.",
1242///      "type": "object",
1243///      "additionalProperties": true
1244///    },
1245///    "modelPreferences": {
1246///      "description": "The server's preferences for which model to select. The client MAY ignore these preferences.",
1247///      "$ref": "#/definitions/ModelPreferences"
1248///    },
1249///    "stopSequences": {
1250///      "type": "array",
1251///      "items": {
1252///        "type": "string"
1253///      }
1254///    },
1255///    "systemPrompt": {
1256///      "description": "An optional system prompt the server wants to use for sampling. The client MAY modify or omit this prompt.",
1257///      "type": "string"
1258///    },
1259///    "temperature": {
1260///      "type": "number"
1261///    }
1262///  }
1263///}
1264/// ```
1265/// </details>
1266#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
1267pub struct CreateMessageRequestParams {
1268    ///A request to include context from one or more MCP servers (including the caller), to be attached to the prompt. The client MAY ignore this request.
1269    #[serde(
1270        rename = "includeContext",
1271        default,
1272        skip_serializing_if = "::std::option::Option::is_none"
1273    )]
1274    pub include_context: ::std::option::Option<CreateMessageRequestParamsIncludeContext>,
1275    ///The maximum number of tokens to sample, as requested by the server. The client MAY choose to sample fewer tokens than requested.
1276    #[serde(rename = "maxTokens")]
1277    pub max_tokens: i64,
1278    pub messages: ::std::vec::Vec<SamplingMessage>,
1279    ///Optional metadata to pass through to the LLM provider. The format of this metadata is provider-specific.
1280    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1281    pub metadata:
1282        ::std::option::Option<::serde_json::Map<::std::string::String, ::serde_json::Value>>,
1283    ///The server's preferences for which model to select. The client MAY ignore these preferences.
1284    #[serde(
1285        rename = "modelPreferences",
1286        default,
1287        skip_serializing_if = "::std::option::Option::is_none"
1288    )]
1289    pub model_preferences: ::std::option::Option<ModelPreferences>,
1290    #[serde(
1291        rename = "stopSequences",
1292        default,
1293        skip_serializing_if = "::std::vec::Vec::is_empty"
1294    )]
1295    pub stop_sequences: ::std::vec::Vec<::std::string::String>,
1296    ///An optional system prompt the server wants to use for sampling. The client MAY modify or omit this prompt.
1297    #[serde(
1298        rename = "systemPrompt",
1299        default,
1300        skip_serializing_if = "::std::option::Option::is_none"
1301    )]
1302    pub system_prompt: ::std::option::Option<::std::string::String>,
1303    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1304    pub temperature: ::std::option::Option<f64>,
1305}
1306impl ::std::convert::From<&CreateMessageRequestParams> for CreateMessageRequestParams {
1307    fn from(value: &CreateMessageRequestParams) -> Self {
1308        value.clone()
1309    }
1310}
1311///A request to include context from one or more MCP servers (including the caller), to be attached to the prompt. The client MAY ignore this request.
1312///
1313/// <details><summary>JSON schema</summary>
1314///
1315/// ```json
1316///{
1317///  "description": "A request to include context from one or more MCP servers (including the caller), to be attached to the prompt. The client MAY ignore this request.",
1318///  "type": "string",
1319///  "enum": [
1320///    "allServers",
1321///    "none",
1322///    "thisServer"
1323///  ]
1324///}
1325/// ```
1326/// </details>
1327#[derive(
1328    :: serde :: Deserialize,
1329    :: serde :: Serialize,
1330    Clone,
1331    Copy,
1332    Debug,
1333    Eq,
1334    Hash,
1335    Ord,
1336    PartialEq,
1337    PartialOrd,
1338)]
1339pub enum CreateMessageRequestParamsIncludeContext {
1340    #[serde(rename = "allServers")]
1341    AllServers,
1342    #[serde(rename = "none")]
1343    None,
1344    #[serde(rename = "thisServer")]
1345    ThisServer,
1346}
1347impl ::std::convert::From<&Self> for CreateMessageRequestParamsIncludeContext {
1348    fn from(value: &CreateMessageRequestParamsIncludeContext) -> Self {
1349        value.clone()
1350    }
1351}
1352impl ::std::fmt::Display for CreateMessageRequestParamsIncludeContext {
1353    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1354        match *self {
1355            Self::AllServers => write!(f, "allServers"),
1356            Self::None => write!(f, "none"),
1357            Self::ThisServer => write!(f, "thisServer"),
1358        }
1359    }
1360}
1361impl ::std::str::FromStr for CreateMessageRequestParamsIncludeContext {
1362    type Err = self::error::ConversionError;
1363    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1364        match value {
1365            "allServers" => Ok(Self::AllServers),
1366            "none" => Ok(Self::None),
1367            "thisServer" => Ok(Self::ThisServer),
1368            _ => Err("invalid value".into()),
1369        }
1370    }
1371}
1372impl ::std::convert::TryFrom<&str> for CreateMessageRequestParamsIncludeContext {
1373    type Error = self::error::ConversionError;
1374    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1375        value.parse()
1376    }
1377}
1378impl ::std::convert::TryFrom<&::std::string::String> for CreateMessageRequestParamsIncludeContext {
1379    type Error = self::error::ConversionError;
1380    fn try_from(
1381        value: &::std::string::String,
1382    ) -> ::std::result::Result<Self, self::error::ConversionError> {
1383        value.parse()
1384    }
1385}
1386impl ::std::convert::TryFrom<::std::string::String> for CreateMessageRequestParamsIncludeContext {
1387    type Error = self::error::ConversionError;
1388    fn try_from(
1389        value: ::std::string::String,
1390    ) -> ::std::result::Result<Self, self::error::ConversionError> {
1391        value.parse()
1392    }
1393}
1394///The client's response to a sampling/create_message request from the server. The client should inform the user before returning the sampled message, to allow them to inspect the response (human in the loop) and decide whether to allow the server to see it.
1395///
1396/// <details><summary>JSON schema</summary>
1397///
1398/// ```json
1399///{
1400///  "description": "The client's response to a sampling/create_message request from the server. The client should inform the user before returning the sampled message, to allow them to inspect the response (human in the loop) and decide whether to allow the server to see it.",
1401///  "type": "object",
1402///  "required": [
1403///    "content",
1404///    "model",
1405///    "role"
1406///  ],
1407///  "properties": {
1408///    "_meta": {
1409///      "description": "This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses.",
1410///      "type": "object",
1411///      "additionalProperties": {}
1412///    },
1413///    "content": {
1414///      "anyOf": [
1415///        {
1416///          "$ref": "#/definitions/TextContent"
1417///        },
1418///        {
1419///          "$ref": "#/definitions/ImageContent"
1420///        }
1421///      ]
1422///    },
1423///    "model": {
1424///      "description": "The name of the model that generated the message.",
1425///      "type": "string"
1426///    },
1427///    "role": {
1428///      "$ref": "#/definitions/Role"
1429///    },
1430///    "stopReason": {
1431///      "description": "The reason why sampling stopped, if known.",
1432///      "type": "string"
1433///    }
1434///  }
1435///}
1436/// ```
1437/// </details>
1438#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
1439pub struct CreateMessageResult {
1440    pub content: CreateMessageResultContent,
1441    ///This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses.
1442    #[serde(
1443        rename = "_meta",
1444        default,
1445        skip_serializing_if = "::serde_json::Map::is_empty"
1446    )]
1447    pub meta: ::serde_json::Map<::std::string::String, ::serde_json::Value>,
1448    ///The name of the model that generated the message.
1449    pub model: ::std::string::String,
1450    pub role: Role,
1451    ///The reason why sampling stopped, if known.
1452    #[serde(
1453        rename = "stopReason",
1454        default,
1455        skip_serializing_if = "::std::option::Option::is_none"
1456    )]
1457    pub stop_reason: ::std::option::Option<::std::string::String>,
1458}
1459impl ::std::convert::From<&CreateMessageResult> for CreateMessageResult {
1460    fn from(value: &CreateMessageResult) -> Self {
1461        value.clone()
1462    }
1463}
1464///CreateMessageResultContent
1465///
1466/// <details><summary>JSON schema</summary>
1467///
1468/// ```json
1469///{
1470///  "anyOf": [
1471///    {
1472///      "$ref": "#/definitions/TextContent"
1473///    },
1474///    {
1475///      "$ref": "#/definitions/ImageContent"
1476///    }
1477///  ]
1478///}
1479/// ```
1480/// </details>
1481#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
1482#[serde(untagged)]
1483pub enum CreateMessageResultContent {
1484    TextContent(TextContent),
1485    ImageContent(ImageContent),
1486}
1487impl ::std::convert::From<&Self> for CreateMessageResultContent {
1488    fn from(value: &CreateMessageResultContent) -> Self {
1489        value.clone()
1490    }
1491}
1492impl ::std::convert::From<TextContent> for CreateMessageResultContent {
1493    fn from(value: TextContent) -> Self {
1494        Self::TextContent(value)
1495    }
1496}
1497impl ::std::convert::From<ImageContent> for CreateMessageResultContent {
1498    fn from(value: ImageContent) -> Self {
1499        Self::ImageContent(value)
1500    }
1501}
1502///An opaque token used to represent a cursor for pagination.
1503///
1504/// <details><summary>JSON schema</summary>
1505///
1506/// ```json
1507///{
1508///  "description": "An opaque token used to represent a cursor for pagination.",
1509///  "type": "string"
1510///}
1511/// ```
1512/// </details>
1513#[derive(
1514    :: serde :: Deserialize,
1515    :: serde :: Serialize,
1516    Clone,
1517    Debug,
1518    Eq,
1519    Hash,
1520    Ord,
1521    PartialEq,
1522    PartialOrd,
1523)]
1524#[serde(transparent)]
1525pub struct Cursor(pub ::std::string::String);
1526impl ::std::ops::Deref for Cursor {
1527    type Target = ::std::string::String;
1528    fn deref(&self) -> &::std::string::String {
1529        &self.0
1530    }
1531}
1532impl ::std::convert::From<Cursor> for ::std::string::String {
1533    fn from(value: Cursor) -> Self {
1534        value.0
1535    }
1536}
1537impl ::std::convert::From<&Cursor> for Cursor {
1538    fn from(value: &Cursor) -> Self {
1539        value.clone()
1540    }
1541}
1542impl ::std::convert::From<::std::string::String> for Cursor {
1543    fn from(value: ::std::string::String) -> Self {
1544        Self(value)
1545    }
1546}
1547impl ::std::str::FromStr for Cursor {
1548    type Err = ::std::convert::Infallible;
1549    fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
1550        Ok(Self(value.to_string()))
1551    }
1552}
1553impl ::std::fmt::Display for Cursor {
1554    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1555        self.0.fmt(f)
1556    }
1557}
1558///The contents of a resource, embedded into a prompt or tool call result.
1559///
1560///It is up to the client how best to render embedded resources for the benefit
1561///of the LLM and/or the user.
1562///
1563/// <details><summary>JSON schema</summary>
1564///
1565/// ```json
1566///{
1567///  "description": "The contents of a resource, embedded into a prompt or tool call result.\n\nIt is up to the client how best to render embedded resources for the benefit\nof the LLM and/or the user.",
1568///  "type": "object",
1569///  "required": [
1570///    "resource",
1571///    "type"
1572///  ],
1573///  "properties": {
1574///    "annotations": {
1575///      "type": "object",
1576///      "properties": {
1577///        "audience": {
1578///          "description": "Describes who the intended customer of this object or data is.\n\nIt can include multiple entries to indicate content useful for multiple audiences (e.g., `[\"user\", \"assistant\"]`).",
1579///          "type": "array",
1580///          "items": {
1581///            "$ref": "#/definitions/Role"
1582///          }
1583///        },
1584///        "priority": {
1585///          "description": "Describes how important this data is for operating the server.\n\nA value of 1 means \"most important,\" and indicates that the data is\neffectively required, while 0 means \"least important,\" and indicates that\nthe data is entirely optional.",
1586///          "type": "number",
1587///          "maximum": 1.0,
1588///          "minimum": 0.0
1589///        }
1590///      }
1591///    },
1592///    "resource": {
1593///      "anyOf": [
1594///        {
1595///          "$ref": "#/definitions/TextResourceContents"
1596///        },
1597///        {
1598///          "$ref": "#/definitions/BlobResourceContents"
1599///        }
1600///      ]
1601///    },
1602///    "type": {
1603///      "type": "string",
1604///      "const": "resource"
1605///    }
1606///  }
1607///}
1608/// ```
1609/// </details>
1610#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
1611pub struct EmbeddedResource {
1612    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1613    pub annotations: ::std::option::Option<EmbeddedResourceAnnotations>,
1614    pub resource: EmbeddedResourceResource,
1615    #[serde(rename = "type")]
1616    pub type_: ::std::string::String,
1617}
1618impl ::std::convert::From<&EmbeddedResource> for EmbeddedResource {
1619    fn from(value: &EmbeddedResource) -> Self {
1620        value.clone()
1621    }
1622}
1623///EmbeddedResourceAnnotations
1624///
1625/// <details><summary>JSON schema</summary>
1626///
1627/// ```json
1628///{
1629///  "type": "object",
1630///  "properties": {
1631///    "audience": {
1632///      "description": "Describes who the intended customer of this object or data is.\n\nIt can include multiple entries to indicate content useful for multiple audiences (e.g., `[\"user\", \"assistant\"]`).",
1633///      "type": "array",
1634///      "items": {
1635///        "$ref": "#/definitions/Role"
1636///      }
1637///    },
1638///    "priority": {
1639///      "description": "Describes how important this data is for operating the server.\n\nA value of 1 means \"most important,\" and indicates that the data is\neffectively required, while 0 means \"least important,\" and indicates that\nthe data is entirely optional.",
1640///      "type": "number",
1641///      "maximum": 1.0,
1642///      "minimum": 0.0
1643///    }
1644///  }
1645///}
1646/// ```
1647/// </details>
1648#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
1649pub struct EmbeddedResourceAnnotations {
1650    ///Describes who the intended customer of this object or data is.
1651    ///
1652    ///It can include multiple entries to indicate content useful for multiple audiences (e.g., `["user", "assistant"]`).
1653    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
1654    pub audience: ::std::vec::Vec<Role>,
1655    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1656    pub priority: ::std::option::Option<f64>,
1657}
1658impl ::std::convert::From<&EmbeddedResourceAnnotations> for EmbeddedResourceAnnotations {
1659    fn from(value: &EmbeddedResourceAnnotations) -> Self {
1660        value.clone()
1661    }
1662}
1663impl ::std::default::Default for EmbeddedResourceAnnotations {
1664    fn default() -> Self {
1665        Self {
1666            audience: Default::default(),
1667            priority: Default::default(),
1668        }
1669    }
1670}
1671///EmbeddedResourceResource
1672///
1673/// <details><summary>JSON schema</summary>
1674///
1675/// ```json
1676///{
1677///  "anyOf": [
1678///    {
1679///      "$ref": "#/definitions/TextResourceContents"
1680///    },
1681///    {
1682///      "$ref": "#/definitions/BlobResourceContents"
1683///    }
1684///  ]
1685///}
1686/// ```
1687/// </details>
1688#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
1689#[serde(untagged)]
1690pub enum EmbeddedResourceResource {
1691    TextResourceContents(TextResourceContents),
1692    BlobResourceContents(BlobResourceContents),
1693}
1694impl ::std::convert::From<&Self> for EmbeddedResourceResource {
1695    fn from(value: &EmbeddedResourceResource) -> Self {
1696        value.clone()
1697    }
1698}
1699impl ::std::convert::From<TextResourceContents> for EmbeddedResourceResource {
1700    fn from(value: TextResourceContents) -> Self {
1701        Self::TextResourceContents(value)
1702    }
1703}
1704impl ::std::convert::From<BlobResourceContents> for EmbeddedResourceResource {
1705    fn from(value: BlobResourceContents) -> Self {
1706        Self::BlobResourceContents(value)
1707    }
1708}
1709///EmptyResult
1710///
1711/// <details><summary>JSON schema</summary>
1712///
1713/// ```json
1714///{
1715///  "$ref": "#/definitions/Result"
1716///}
1717/// ```
1718/// </details>
1719#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
1720#[serde(transparent)]
1721pub struct EmptyResult(pub Result);
1722impl ::std::ops::Deref for EmptyResult {
1723    type Target = Result;
1724    fn deref(&self) -> &Result {
1725        &self.0
1726    }
1727}
1728impl ::std::convert::From<EmptyResult> for Result {
1729    fn from(value: EmptyResult) -> Self {
1730        value.0
1731    }
1732}
1733impl ::std::convert::From<&EmptyResult> for EmptyResult {
1734    fn from(value: &EmptyResult) -> Self {
1735        value.clone()
1736    }
1737}
1738impl ::std::convert::From<Result> for EmptyResult {
1739    fn from(value: Result) -> Self {
1740        Self(value)
1741    }
1742}
1743///Used by the client to get a prompt provided by the server.
1744///
1745/// <details><summary>JSON schema</summary>
1746///
1747/// ```json
1748///{
1749///  "description": "Used by the client to get a prompt provided by the server.",
1750///  "type": "object",
1751///  "required": [
1752///    "method",
1753///    "params"
1754///  ],
1755///  "properties": {
1756///    "method": {
1757///      "type": "string",
1758///      "const": "prompts/get"
1759///    },
1760///    "params": {
1761///      "type": "object",
1762///      "required": [
1763///        "name"
1764///      ],
1765///      "properties": {
1766///        "arguments": {
1767///          "description": "Arguments to use for templating the prompt.",
1768///          "type": "object",
1769///          "additionalProperties": {
1770///            "type": "string"
1771///          }
1772///        },
1773///        "name": {
1774///          "description": "The name of the prompt or prompt template.",
1775///          "type": "string"
1776///        }
1777///      }
1778///    }
1779///  }
1780///}
1781/// ```
1782/// </details>
1783#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
1784pub struct GetPromptRequest {
1785    pub method: ::std::string::String,
1786    pub params: GetPromptRequestParams,
1787}
1788impl ::std::convert::From<&GetPromptRequest> for GetPromptRequest {
1789    fn from(value: &GetPromptRequest) -> Self {
1790        value.clone()
1791    }
1792}
1793///GetPromptRequestParams
1794///
1795/// <details><summary>JSON schema</summary>
1796///
1797/// ```json
1798///{
1799///  "type": "object",
1800///  "required": [
1801///    "name"
1802///  ],
1803///  "properties": {
1804///    "arguments": {
1805///      "description": "Arguments to use for templating the prompt.",
1806///      "type": "object",
1807///      "additionalProperties": {
1808///        "type": "string"
1809///      }
1810///    },
1811///    "name": {
1812///      "description": "The name of the prompt or prompt template.",
1813///      "type": "string"
1814///    }
1815///  }
1816///}
1817/// ```
1818/// </details>
1819#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
1820pub struct GetPromptRequestParams {
1821    ///Arguments to use for templating the prompt.
1822    #[serde(
1823        default,
1824        skip_serializing_if = ":: std :: collections :: BTreeMap::is_empty"
1825    )]
1826    pub arguments: ::std::collections::BTreeMap<::std::string::String, ::std::string::String>,
1827    ///The name of the prompt or prompt template.
1828    pub name: ::std::string::String,
1829}
1830impl ::std::convert::From<&GetPromptRequestParams> for GetPromptRequestParams {
1831    fn from(value: &GetPromptRequestParams) -> Self {
1832        value.clone()
1833    }
1834}
1835///The server's response to a prompts/get request from the client.
1836///
1837/// <details><summary>JSON schema</summary>
1838///
1839/// ```json
1840///{
1841///  "description": "The server's response to a prompts/get request from the client.",
1842///  "type": "object",
1843///  "required": [
1844///    "messages"
1845///  ],
1846///  "properties": {
1847///    "_meta": {
1848///      "description": "This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses.",
1849///      "type": "object",
1850///      "additionalProperties": {}
1851///    },
1852///    "description": {
1853///      "description": "An optional description for the prompt.",
1854///      "type": "string"
1855///    },
1856///    "messages": {
1857///      "type": "array",
1858///      "items": {
1859///        "$ref": "#/definitions/PromptMessage"
1860///      }
1861///    }
1862///  }
1863///}
1864/// ```
1865/// </details>
1866#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq, Default)]
1867pub struct GetPromptResult {
1868    ///An optional description for the prompt.
1869    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1870    pub description: ::std::option::Option<::std::string::String>,
1871    pub messages: ::std::vec::Vec<PromptMessage>,
1872    ///This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses.
1873    #[serde(
1874        rename = "_meta",
1875        default,
1876        skip_serializing_if = "::serde_json::Map::is_empty"
1877    )]
1878    pub meta: ::serde_json::Map<::std::string::String, ::serde_json::Value>,
1879}
1880impl ::std::convert::From<&GetPromptResult> for GetPromptResult {
1881    fn from(value: &GetPromptResult) -> Self {
1882        value.clone()
1883    }
1884}
1885///An image provided to or from an LLM.
1886///
1887/// <details><summary>JSON schema</summary>
1888///
1889/// ```json
1890///{
1891///  "description": "An image provided to or from an LLM.",
1892///  "type": "object",
1893///  "required": [
1894///    "data",
1895///    "mimeType",
1896///    "type"
1897///  ],
1898///  "properties": {
1899///    "annotations": {
1900///      "type": "object",
1901///      "properties": {
1902///        "audience": {
1903///          "description": "Describes who the intended customer of this object or data is.\n\nIt can include multiple entries to indicate content useful for multiple audiences (e.g., `[\"user\", \"assistant\"]`).",
1904///          "type": "array",
1905///          "items": {
1906///            "$ref": "#/definitions/Role"
1907///          }
1908///        },
1909///        "priority": {
1910///          "description": "Describes how important this data is for operating the server.\n\nA value of 1 means \"most important,\" and indicates that the data is\neffectively required, while 0 means \"least important,\" and indicates that\nthe data is entirely optional.",
1911///          "type": "number",
1912///          "maximum": 1.0,
1913///          "minimum": 0.0
1914///        }
1915///      }
1916///    },
1917///    "data": {
1918///      "description": "The base64-encoded image data.",
1919///      "type": "string",
1920///      "format": "byte"
1921///    },
1922///    "mimeType": {
1923///      "description": "The MIME type of the image. Different providers may support different image types.",
1924///      "type": "string"
1925///    },
1926///    "type": {
1927///      "type": "string",
1928///      "const": "image"
1929///    }
1930///  }
1931///}
1932/// ```
1933/// </details>
1934#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
1935pub struct ImageContent {
1936    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1937    pub annotations: ::std::option::Option<ImageContentAnnotations>,
1938    ///The base64-encoded image data.
1939    pub data: crate::utils::Base64Bytes,
1940    ///The MIME type of the image. Different providers may support different image types.
1941    #[serde(rename = "mimeType")]
1942    pub mime_type: ::std::string::String,
1943    #[serde(rename = "type")]
1944    pub type_: ::std::string::String,
1945}
1946impl ::std::convert::From<&ImageContent> for ImageContent {
1947    fn from(value: &ImageContent) -> Self {
1948        value.clone()
1949    }
1950}
1951///ImageContentAnnotations
1952///
1953/// <details><summary>JSON schema</summary>
1954///
1955/// ```json
1956///{
1957///  "type": "object",
1958///  "properties": {
1959///    "audience": {
1960///      "description": "Describes who the intended customer of this object or data is.\n\nIt can include multiple entries to indicate content useful for multiple audiences (e.g., `[\"user\", \"assistant\"]`).",
1961///      "type": "array",
1962///      "items": {
1963///        "$ref": "#/definitions/Role"
1964///      }
1965///    },
1966///    "priority": {
1967///      "description": "Describes how important this data is for operating the server.\n\nA value of 1 means \"most important,\" and indicates that the data is\neffectively required, while 0 means \"least important,\" and indicates that\nthe data is entirely optional.",
1968///      "type": "number",
1969///      "maximum": 1.0,
1970///      "minimum": 0.0
1971///    }
1972///  }
1973///}
1974/// ```
1975/// </details>
1976#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
1977pub struct ImageContentAnnotations {
1978    ///Describes who the intended customer of this object or data is.
1979    ///
1980    ///It can include multiple entries to indicate content useful for multiple audiences (e.g., `["user", "assistant"]`).
1981    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
1982    pub audience: ::std::vec::Vec<Role>,
1983    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1984    pub priority: ::std::option::Option<f64>,
1985}
1986impl ::std::convert::From<&ImageContentAnnotations> for ImageContentAnnotations {
1987    fn from(value: &ImageContentAnnotations) -> Self {
1988        value.clone()
1989    }
1990}
1991impl ::std::default::Default for ImageContentAnnotations {
1992    fn default() -> Self {
1993        Self {
1994            audience: Default::default(),
1995            priority: Default::default(),
1996        }
1997    }
1998}
1999///Describes the name and version of an MCP implementation.
2000///
2001/// <details><summary>JSON schema</summary>
2002///
2003/// ```json
2004///{
2005///  "description": "Describes the name and version of an MCP implementation.",
2006///  "type": "object",
2007///  "required": [
2008///    "name",
2009///    "version"
2010///  ],
2011///  "properties": {
2012///    "name": {
2013///      "type": "string"
2014///    },
2015///    "version": {
2016///      "type": "string"
2017///    }
2018///  }
2019///}
2020/// ```
2021/// </details>
2022#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
2023pub struct Implementation {
2024    pub name: ::std::string::String,
2025    pub version: ::std::string::String,
2026}
2027impl ::std::convert::From<&Implementation> for Implementation {
2028    fn from(value: &Implementation) -> Self {
2029        value.clone()
2030    }
2031}
2032///This request is sent from the client to the server when it first connects, asking it to begin initialization.
2033///
2034/// <details><summary>JSON schema</summary>
2035///
2036/// ```json
2037///{
2038///  "description": "This request is sent from the client to the server when it first connects, asking it to begin initialization.",
2039///  "type": "object",
2040///  "required": [
2041///    "method",
2042///    "params"
2043///  ],
2044///  "properties": {
2045///    "method": {
2046///      "type": "string",
2047///      "const": "initialize"
2048///    },
2049///    "params": {
2050///      "type": "object",
2051///      "required": [
2052///        "capabilities",
2053///        "clientInfo",
2054///        "protocolVersion"
2055///      ],
2056///      "properties": {
2057///        "capabilities": {
2058///          "$ref": "#/definitions/ClientCapabilities"
2059///        },
2060///        "clientInfo": {
2061///          "$ref": "#/definitions/Implementation"
2062///        },
2063///        "protocolVersion": {
2064///          "description": "The latest version of the Model Context Protocol that the client supports. The client MAY decide to support older versions as well.",
2065///          "type": "string"
2066///        }
2067///      }
2068///    }
2069///  }
2070///}
2071/// ```
2072/// </details>
2073#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
2074pub struct InitializeRequest {
2075    pub method: ::std::string::String,
2076    pub params: InitializeRequestParams,
2077}
2078impl ::std::convert::From<&InitializeRequest> for InitializeRequest {
2079    fn from(value: &InitializeRequest) -> Self {
2080        value.clone()
2081    }
2082}
2083///InitializeRequestParams
2084///
2085/// <details><summary>JSON schema</summary>
2086///
2087/// ```json
2088///{
2089///  "type": "object",
2090///  "required": [
2091///    "capabilities",
2092///    "clientInfo",
2093///    "protocolVersion"
2094///  ],
2095///  "properties": {
2096///    "capabilities": {
2097///      "$ref": "#/definitions/ClientCapabilities"
2098///    },
2099///    "clientInfo": {
2100///      "$ref": "#/definitions/Implementation"
2101///    },
2102///    "protocolVersion": {
2103///      "description": "The latest version of the Model Context Protocol that the client supports. The client MAY decide to support older versions as well.",
2104///      "type": "string"
2105///    }
2106///  }
2107///}
2108/// ```
2109/// </details>
2110#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
2111pub struct InitializeRequestParams {
2112    pub capabilities: ClientCapabilities,
2113    #[serde(rename = "clientInfo")]
2114    pub client_info: Implementation,
2115    ///The latest version of the Model Context Protocol that the client supports. The client MAY decide to support older versions as well.
2116    #[serde(rename = "protocolVersion")]
2117    pub protocol_version: ::std::string::String,
2118}
2119impl ::std::convert::From<&InitializeRequestParams> for InitializeRequestParams {
2120    fn from(value: &InitializeRequestParams) -> Self {
2121        value.clone()
2122    }
2123}
2124///After receiving an initialize request from the client, the server sends this response.
2125///
2126/// <details><summary>JSON schema</summary>
2127///
2128/// ```json
2129///{
2130///  "description": "After receiving an initialize request from the client, the server sends this response.",
2131///  "type": "object",
2132///  "required": [
2133///    "capabilities",
2134///    "protocolVersion",
2135///    "serverInfo"
2136///  ],
2137///  "properties": {
2138///    "_meta": {
2139///      "description": "This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses.",
2140///      "type": "object",
2141///      "additionalProperties": {}
2142///    },
2143///    "capabilities": {
2144///      "$ref": "#/definitions/ServerCapabilities"
2145///    },
2146///    "instructions": {
2147///      "description": "Instructions describing how to use the server and its features.\n\nThis can be used by clients to improve the LLM's understanding of available tools, resources, etc. It can be thought of like a \"hint\" to the model. For example, this information MAY be added to the system prompt.",
2148///      "type": "string"
2149///    },
2150///    "protocolVersion": {
2151///      "description": "The version of the Model Context Protocol that the server wants to use. This may not match the version that the client requested. If the client cannot support this version, it MUST disconnect.",
2152///      "type": "string"
2153///    },
2154///    "serverInfo": {
2155///      "$ref": "#/definitions/Implementation"
2156///    }
2157///  }
2158///}
2159/// ```
2160/// </details>
2161#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
2162pub struct InitializeResult {
2163    pub capabilities: ServerCapabilities,
2164    ///Instructions describing how to use the server and its features.
2165    ///
2166    ///This can be used by clients to improve the LLM's understanding of available tools, resources, etc. It can be thought of like a "hint" to the model. For example, this information MAY be added to the system prompt.
2167    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2168    pub instructions: ::std::option::Option<::std::string::String>,
2169    ///This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses.
2170    #[serde(
2171        rename = "_meta",
2172        default,
2173        skip_serializing_if = "::serde_json::Map::is_empty"
2174    )]
2175    pub meta: ::serde_json::Map<::std::string::String, ::serde_json::Value>,
2176    ///The version of the Model Context Protocol that the server wants to use. This may not match the version that the client requested. If the client cannot support this version, it MUST disconnect.
2177    #[serde(rename = "protocolVersion")]
2178    pub protocol_version: ::std::string::String,
2179    #[serde(rename = "serverInfo")]
2180    pub server_info: Implementation,
2181}
2182impl ::std::convert::From<&InitializeResult> for InitializeResult {
2183    fn from(value: &InitializeResult) -> Self {
2184        value.clone()
2185    }
2186}
2187///This notification is sent from the client to the server after initialization has finished.
2188///
2189/// <details><summary>JSON schema</summary>
2190///
2191/// ```json
2192///{
2193///  "description": "This notification is sent from the client to the server after initialization has finished.",
2194///  "type": "object",
2195///  "required": [
2196///    "method"
2197///  ],
2198///  "properties": {
2199///    "method": {
2200///      "type": "string",
2201///      "const": "notifications/initialized"
2202///    },
2203///    "params": {
2204///      "type": "object",
2205///      "properties": {
2206///        "_meta": {
2207///          "description": "This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications.",
2208///          "type": "object",
2209///          "additionalProperties": {}
2210///        }
2211///      },
2212///      "additionalProperties": {}
2213///    }
2214///  }
2215///}
2216/// ```
2217/// </details>
2218#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
2219pub struct InitializedNotification {
2220    pub method: ::std::string::String,
2221    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2222    pub params: ::std::option::Option<InitializedNotificationParams>,
2223}
2224impl ::std::convert::From<&InitializedNotification> for InitializedNotification {
2225    fn from(value: &InitializedNotification) -> Self {
2226        value.clone()
2227    }
2228}
2229///InitializedNotificationParams
2230///
2231/// <details><summary>JSON schema</summary>
2232///
2233/// ```json
2234///{
2235///  "type": "object",
2236///  "properties": {
2237///    "_meta": {
2238///      "description": "This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications.",
2239///      "type": "object",
2240///      "additionalProperties": {}
2241///    }
2242///  },
2243///  "additionalProperties": {}
2244///}
2245/// ```
2246/// </details>
2247#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
2248pub struct InitializedNotificationParams {
2249    ///This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications.
2250    #[serde(
2251        rename = "_meta",
2252        default,
2253        skip_serializing_if = "::serde_json::Map::is_empty"
2254    )]
2255    pub meta: ::serde_json::Map<::std::string::String, ::serde_json::Value>,
2256}
2257impl ::std::convert::From<&InitializedNotificationParams> for InitializedNotificationParams {
2258    fn from(value: &InitializedNotificationParams) -> Self {
2259        value.clone()
2260    }
2261}
2262impl ::std::default::Default for InitializedNotificationParams {
2263    fn default() -> Self {
2264        Self {
2265            meta: Default::default(),
2266        }
2267    }
2268}
2269///A response to a request that indicates an error occurred.
2270///
2271/// <details><summary>JSON schema</summary>
2272///
2273/// ```json
2274///{
2275///  "description": "A response to a request that indicates an error occurred.",
2276///  "type": "object",
2277///  "required": [
2278///    "error",
2279///    "id",
2280///    "jsonrpc"
2281///  ],
2282///  "properties": {
2283///    "error": {
2284///      "type": "object",
2285///      "required": [
2286///        "code",
2287///        "message"
2288///      ],
2289///      "properties": {
2290///        "code": {
2291///          "description": "The error type that occurred.",
2292///          "type": "integer"
2293///        },
2294///        "data": {
2295///          "description": "Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.)."
2296///        },
2297///        "message": {
2298///          "description": "A short description of the error. The message SHOULD be limited to a concise single sentence.",
2299///          "type": "string"
2300///        }
2301///      }
2302///    },
2303///    "id": {
2304///      "$ref": "#/definitions/RequestId"
2305///    },
2306///    "jsonrpc": {
2307///      "type": "string",
2308///      "const": "2.0"
2309///    }
2310///  }
2311///}
2312/// ```
2313/// </details>
2314#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
2315pub struct JsonrpcError {
2316    pub error: JsonrpcErrorError,
2317    pub id: RequestId,
2318    pub jsonrpc: ::std::string::String,
2319}
2320impl ::std::convert::From<&JsonrpcError> for JsonrpcError {
2321    fn from(value: &JsonrpcError) -> Self {
2322        value.clone()
2323    }
2324}
2325///JsonrpcErrorError
2326///
2327/// <details><summary>JSON schema</summary>
2328///
2329/// ```json
2330///{
2331///  "type": "object",
2332///  "required": [
2333///    "code",
2334///    "message"
2335///  ],
2336///  "properties": {
2337///    "code": {
2338///      "description": "The error type that occurred.",
2339///      "type": "integer"
2340///    },
2341///    "data": {
2342///      "description": "Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.)."
2343///    },
2344///    "message": {
2345///      "description": "A short description of the error. The message SHOULD be limited to a concise single sentence.",
2346///      "type": "string"
2347///    }
2348///  }
2349///}
2350/// ```
2351/// </details>
2352#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
2353pub struct JsonrpcErrorError {
2354    ///The error type that occurred.
2355    pub code: i64,
2356    ///Additional information about the error. The value of this member is defined by the sender (e.g. detailed error information, nested errors etc.).
2357    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2358    pub data: ::std::option::Option<::serde_json::Value>,
2359    ///A short description of the error. The message SHOULD be limited to a concise single sentence.
2360    pub message: ::std::string::String,
2361}
2362impl ::std::convert::From<&JsonrpcErrorError> for JsonrpcErrorError {
2363    fn from(value: &JsonrpcErrorError) -> Self {
2364        value.clone()
2365    }
2366}
2367///JsonrpcMessage
2368///
2369/// <details><summary>JSON schema</summary>
2370///
2371/// ```json
2372///{
2373///  "anyOf": [
2374///    {
2375///      "$ref": "#/definitions/JSONRPCRequest"
2376///    },
2377///    {
2378///      "$ref": "#/definitions/JSONRPCNotification"
2379///    },
2380///    {
2381///      "$ref": "#/definitions/JSONRPCResponse"
2382///    },
2383///    {
2384///      "$ref": "#/definitions/JSONRPCError"
2385///    }
2386///  ]
2387///}
2388/// ```
2389/// </details>
2390#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
2391#[serde(untagged)]
2392pub enum JsonrpcMessage {
2393    Request(JsonrpcRequest),
2394    Notification(JsonrpcNotification),
2395    Response(JsonrpcResponse),
2396    Error(JsonrpcError),
2397}
2398impl ::std::convert::From<&Self> for JsonrpcMessage {
2399    fn from(value: &JsonrpcMessage) -> Self {
2400        value.clone()
2401    }
2402}
2403impl ::std::convert::From<JsonrpcRequest> for JsonrpcMessage {
2404    fn from(value: JsonrpcRequest) -> Self {
2405        Self::Request(value)
2406    }
2407}
2408impl ::std::convert::From<JsonrpcNotification> for JsonrpcMessage {
2409    fn from(value: JsonrpcNotification) -> Self {
2410        Self::Notification(value)
2411    }
2412}
2413impl ::std::convert::From<JsonrpcResponse> for JsonrpcMessage {
2414    fn from(value: JsonrpcResponse) -> Self {
2415        Self::Response(value)
2416    }
2417}
2418impl ::std::convert::From<JsonrpcError> for JsonrpcMessage {
2419    fn from(value: JsonrpcError) -> Self {
2420        Self::Error(value)
2421    }
2422}
2423///A notification which does not expect a response.
2424///
2425/// <details><summary>JSON schema</summary>
2426///
2427/// ```json
2428///{
2429///  "description": "A notification which does not expect a response.",
2430///  "type": "object",
2431///  "required": [
2432///    "jsonrpc",
2433///    "method"
2434///  ],
2435///  "properties": {
2436///    "jsonrpc": {
2437///      "type": "string",
2438///      "const": "2.0"
2439///    },
2440///    "method": {
2441///      "type": "string"
2442///    },
2443///    "params": {
2444///      "type": "object",
2445///      "properties": {
2446///        "_meta": {
2447///          "description": "This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications.",
2448///          "type": "object",
2449///          "additionalProperties": {}
2450///        }
2451///      },
2452///      "additionalProperties": {}
2453///    }
2454///  }
2455///}
2456/// ```
2457/// </details>
2458#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
2459pub struct JsonrpcNotification {
2460    pub jsonrpc: ::std::string::String,
2461    pub method: ::std::string::String,
2462    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2463    pub params: ::std::option::Option<JsonrpcNotificationParams>,
2464}
2465impl ::std::convert::From<&JsonrpcNotification> for JsonrpcNotification {
2466    fn from(value: &JsonrpcNotification) -> Self {
2467        value.clone()
2468    }
2469}
2470///JsonrpcNotificationParams
2471///
2472/// <details><summary>JSON schema</summary>
2473///
2474/// ```json
2475///{
2476///  "type": "object",
2477///  "properties": {
2478///    "_meta": {
2479///      "description": "This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications.",
2480///      "type": "object",
2481///      "additionalProperties": {}
2482///    }
2483///  },
2484///  "additionalProperties": {}
2485///}
2486/// ```
2487/// </details>
2488#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
2489pub struct JsonrpcNotificationParams {
2490    ///This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications.
2491    #[serde(
2492        rename = "_meta",
2493        default,
2494        skip_serializing_if = "::serde_json::Map::is_empty"
2495    )]
2496    pub meta: ::serde_json::Map<::std::string::String, ::serde_json::Value>,
2497}
2498impl ::std::convert::From<&JsonrpcNotificationParams> for JsonrpcNotificationParams {
2499    fn from(value: &JsonrpcNotificationParams) -> Self {
2500        value.clone()
2501    }
2502}
2503impl ::std::default::Default for JsonrpcNotificationParams {
2504    fn default() -> Self {
2505        Self {
2506            meta: Default::default(),
2507        }
2508    }
2509}
2510///A request that expects a response.
2511///
2512/// <details><summary>JSON schema</summary>
2513///
2514/// ```json
2515///{
2516///  "description": "A request that expects a response.",
2517///  "type": "object",
2518///  "required": [
2519///    "id",
2520///    "jsonrpc",
2521///    "method"
2522///  ],
2523///  "properties": {
2524///    "id": {
2525///      "$ref": "#/definitions/RequestId"
2526///    },
2527///    "jsonrpc": {
2528///      "type": "string",
2529///      "const": "2.0"
2530///    },
2531///    "method": {
2532///      "type": "string"
2533///    },
2534///    "params": {
2535///      "type": "object",
2536///      "properties": {
2537///        "_meta": {
2538///          "type": "object",
2539///          "properties": {
2540///            "progressToken": {
2541///              "description": "If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.",
2542///              "$ref": "#/definitions/ProgressToken"
2543///            }
2544///          }
2545///        }
2546///      },
2547///      "additionalProperties": {}
2548///    }
2549///  }
2550///}
2551/// ```
2552/// </details>
2553#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
2554pub struct JsonrpcRequest {
2555    pub id: RequestId,
2556    pub jsonrpc: ::std::string::String,
2557    pub method: ::std::string::String,
2558    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2559    pub params: ::std::option::Option<JsonrpcRequestParams>,
2560}
2561impl ::std::convert::From<&JsonrpcRequest> for JsonrpcRequest {
2562    fn from(value: &JsonrpcRequest) -> Self {
2563        value.clone()
2564    }
2565}
2566///JsonrpcRequestParams
2567///
2568/// <details><summary>JSON schema</summary>
2569///
2570/// ```json
2571///{
2572///  "type": "object",
2573///  "properties": {
2574///    "_meta": {
2575///      "type": "object",
2576///      "properties": {
2577///        "progressToken": {
2578///          "description": "If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.",
2579///          "$ref": "#/definitions/ProgressToken"
2580///        }
2581///      }
2582///    }
2583///  },
2584///  "additionalProperties": {}
2585///}
2586/// ```
2587/// </details>
2588#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
2589pub struct JsonrpcRequestParams {
2590    #[serde(
2591        rename = "_meta",
2592        default,
2593        skip_serializing_if = "::std::option::Option::is_none"
2594    )]
2595    pub meta: ::std::option::Option<JsonrpcRequestParamsMeta>,
2596}
2597impl ::std::convert::From<&JsonrpcRequestParams> for JsonrpcRequestParams {
2598    fn from(value: &JsonrpcRequestParams) -> Self {
2599        value.clone()
2600    }
2601}
2602impl ::std::default::Default for JsonrpcRequestParams {
2603    fn default() -> Self {
2604        Self {
2605            meta: Default::default(),
2606        }
2607    }
2608}
2609///JsonrpcRequestParamsMeta
2610///
2611/// <details><summary>JSON schema</summary>
2612///
2613/// ```json
2614///{
2615///  "type": "object",
2616///  "properties": {
2617///    "progressToken": {
2618///      "description": "If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.",
2619///      "$ref": "#/definitions/ProgressToken"
2620///    }
2621///  }
2622///}
2623/// ```
2624/// </details>
2625#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
2626pub struct JsonrpcRequestParamsMeta {
2627    ///If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
2628    #[serde(
2629        rename = "progressToken",
2630        default,
2631        skip_serializing_if = "::std::option::Option::is_none"
2632    )]
2633    pub progress_token: ::std::option::Option<RequestId>,
2634}
2635impl ::std::convert::From<&JsonrpcRequestParamsMeta> for JsonrpcRequestParamsMeta {
2636    fn from(value: &JsonrpcRequestParamsMeta) -> Self {
2637        value.clone()
2638    }
2639}
2640impl ::std::default::Default for JsonrpcRequestParamsMeta {
2641    fn default() -> Self {
2642        Self {
2643            progress_token: Default::default(),
2644        }
2645    }
2646}
2647///A successful (non-error) response to a request.
2648///
2649/// <details><summary>JSON schema</summary>
2650///
2651/// ```json
2652///{
2653///  "description": "A successful (non-error) response to a request.",
2654///  "type": "object",
2655///  "required": [
2656///    "id",
2657///    "jsonrpc",
2658///    "result"
2659///  ],
2660///  "properties": {
2661///    "id": {
2662///      "$ref": "#/definitions/RequestId"
2663///    },
2664///    "jsonrpc": {
2665///      "type": "string",
2666///      "const": "2.0"
2667///    },
2668///    "result": {
2669///      "$ref": "#/definitions/Result"
2670///    }
2671///  }
2672///}
2673/// ```
2674/// </details>
2675#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
2676pub struct JsonrpcResponse {
2677    pub id: RequestId,
2678    pub jsonrpc: ::std::string::String,
2679    pub result: Result,
2680}
2681impl ::std::convert::From<&JsonrpcResponse> for JsonrpcResponse {
2682    fn from(value: &JsonrpcResponse) -> Self {
2683        value.clone()
2684    }
2685}
2686///Sent from the client to request a list of prompts and prompt templates the server has.
2687///
2688/// <details><summary>JSON schema</summary>
2689///
2690/// ```json
2691///{
2692///  "description": "Sent from the client to request a list of prompts and prompt templates the server has.",
2693///  "type": "object",
2694///  "required": [
2695///    "method"
2696///  ],
2697///  "properties": {
2698///    "method": {
2699///      "type": "string",
2700///      "const": "prompts/list"
2701///    },
2702///    "params": {
2703///      "type": "object",
2704///      "properties": {
2705///        "cursor": {
2706///          "description": "An opaque token representing the current pagination position.\nIf provided, the server should return results starting after this cursor.",
2707///          "type": "string"
2708///        }
2709///      }
2710///    }
2711///  }
2712///}
2713/// ```
2714/// </details>
2715#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
2716pub struct ListPromptsRequest {
2717    pub method: ::std::string::String,
2718    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2719    pub params: ::std::option::Option<ListPromptsRequestParams>,
2720}
2721impl ::std::convert::From<&ListPromptsRequest> for ListPromptsRequest {
2722    fn from(value: &ListPromptsRequest) -> Self {
2723        value.clone()
2724    }
2725}
2726///ListPromptsRequestParams
2727///
2728/// <details><summary>JSON schema</summary>
2729///
2730/// ```json
2731///{
2732///  "type": "object",
2733///  "properties": {
2734///    "cursor": {
2735///      "description": "An opaque token representing the current pagination position.\nIf provided, the server should return results starting after this cursor.",
2736///      "type": "string"
2737///    }
2738///  }
2739///}
2740/// ```
2741/// </details>
2742#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
2743pub struct ListPromptsRequestParams {
2744    ///An opaque token representing the current pagination position.
2745    ///If provided, the server should return results starting after this cursor.
2746    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2747    pub cursor: ::std::option::Option<::std::string::String>,
2748}
2749impl ::std::convert::From<&ListPromptsRequestParams> for ListPromptsRequestParams {
2750    fn from(value: &ListPromptsRequestParams) -> Self {
2751        value.clone()
2752    }
2753}
2754impl ::std::default::Default for ListPromptsRequestParams {
2755    fn default() -> Self {
2756        Self {
2757            cursor: Default::default(),
2758        }
2759    }
2760}
2761///The server's response to a prompts/list request from the client.
2762///
2763/// <details><summary>JSON schema</summary>
2764///
2765/// ```json
2766///{
2767///  "description": "The server's response to a prompts/list request from the client.",
2768///  "type": "object",
2769///  "required": [
2770///    "prompts"
2771///  ],
2772///  "properties": {
2773///    "_meta": {
2774///      "description": "This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses.",
2775///      "type": "object",
2776///      "additionalProperties": {}
2777///    },
2778///    "nextCursor": {
2779///      "description": "An opaque token representing the pagination position after the last returned result.\nIf present, there may be more results available.",
2780///      "type": "string"
2781///    },
2782///    "prompts": {
2783///      "type": "array",
2784///      "items": {
2785///        "$ref": "#/definitions/Prompt"
2786///      }
2787///    }
2788///  }
2789///}
2790/// ```
2791/// </details>
2792#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq, Default)]
2793pub struct ListPromptsResult {
2794    ///This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses.
2795    #[serde(
2796        rename = "_meta",
2797        default,
2798        skip_serializing_if = "::serde_json::Map::is_empty"
2799    )]
2800    pub meta: ::serde_json::Map<::std::string::String, ::serde_json::Value>,
2801    ///An opaque token representing the pagination position after the last returned result.
2802    ///If present, there may be more results available.
2803    #[serde(
2804        rename = "nextCursor",
2805        default,
2806        skip_serializing_if = "::std::option::Option::is_none"
2807    )]
2808    pub next_cursor: ::std::option::Option<::std::string::String>,
2809    pub prompts: ::std::vec::Vec<Prompt>,
2810}
2811impl ::std::convert::From<&ListPromptsResult> for ListPromptsResult {
2812    fn from(value: &ListPromptsResult) -> Self {
2813        value.clone()
2814    }
2815}
2816///Sent from the client to request a list of resource templates the server has.
2817///
2818/// <details><summary>JSON schema</summary>
2819///
2820/// ```json
2821///{
2822///  "description": "Sent from the client to request a list of resource templates the server has.",
2823///  "type": "object",
2824///  "required": [
2825///    "method"
2826///  ],
2827///  "properties": {
2828///    "method": {
2829///      "type": "string",
2830///      "const": "resources/templates/list"
2831///    },
2832///    "params": {
2833///      "type": "object",
2834///      "properties": {
2835///        "cursor": {
2836///          "description": "An opaque token representing the current pagination position.\nIf provided, the server should return results starting after this cursor.",
2837///          "type": "string"
2838///        }
2839///      }
2840///    }
2841///  }
2842///}
2843/// ```
2844/// </details>
2845#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
2846pub struct ListResourceTemplatesRequest {
2847    pub method: ::std::string::String,
2848    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2849    pub params: ::std::option::Option<ListResourceTemplatesRequestParams>,
2850}
2851impl ::std::convert::From<&ListResourceTemplatesRequest> for ListResourceTemplatesRequest {
2852    fn from(value: &ListResourceTemplatesRequest) -> Self {
2853        value.clone()
2854    }
2855}
2856///ListResourceTemplatesRequestParams
2857///
2858/// <details><summary>JSON schema</summary>
2859///
2860/// ```json
2861///{
2862///  "type": "object",
2863///  "properties": {
2864///    "cursor": {
2865///      "description": "An opaque token representing the current pagination position.\nIf provided, the server should return results starting after this cursor.",
2866///      "type": "string"
2867///    }
2868///  }
2869///}
2870/// ```
2871/// </details>
2872#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
2873pub struct ListResourceTemplatesRequestParams {
2874    ///An opaque token representing the current pagination position.
2875    ///If provided, the server should return results starting after this cursor.
2876    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2877    pub cursor: ::std::option::Option<::std::string::String>,
2878}
2879impl ::std::convert::From<&ListResourceTemplatesRequestParams>
2880    for ListResourceTemplatesRequestParams
2881{
2882    fn from(value: &ListResourceTemplatesRequestParams) -> Self {
2883        value.clone()
2884    }
2885}
2886impl ::std::default::Default for ListResourceTemplatesRequestParams {
2887    fn default() -> Self {
2888        Self {
2889            cursor: Default::default(),
2890        }
2891    }
2892}
2893///The server's response to a resources/templates/list request from the client.
2894///
2895/// <details><summary>JSON schema</summary>
2896///
2897/// ```json
2898///{
2899///  "description": "The server's response to a resources/templates/list request from the client.",
2900///  "type": "object",
2901///  "required": [
2902///    "resourceTemplates"
2903///  ],
2904///  "properties": {
2905///    "_meta": {
2906///      "description": "This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses.",
2907///      "type": "object",
2908///      "additionalProperties": {}
2909///    },
2910///    "nextCursor": {
2911///      "description": "An opaque token representing the pagination position after the last returned result.\nIf present, there may be more results available.",
2912///      "type": "string"
2913///    },
2914///    "resourceTemplates": {
2915///      "type": "array",
2916///      "items": {
2917///        "$ref": "#/definitions/ResourceTemplate"
2918///      }
2919///    }
2920///  }
2921///}
2922/// ```
2923/// </details>
2924#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq, Default)]
2925pub struct ListResourceTemplatesResult {
2926    ///This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses.
2927    #[serde(
2928        rename = "_meta",
2929        default,
2930        skip_serializing_if = "::serde_json::Map::is_empty"
2931    )]
2932    pub meta: ::serde_json::Map<::std::string::String, ::serde_json::Value>,
2933    ///An opaque token representing the pagination position after the last returned result.
2934    ///If present, there may be more results available.
2935    #[serde(
2936        rename = "nextCursor",
2937        default,
2938        skip_serializing_if = "::std::option::Option::is_none"
2939    )]
2940    pub next_cursor: ::std::option::Option<::std::string::String>,
2941    #[serde(rename = "resourceTemplates")]
2942    pub resource_templates: ::std::vec::Vec<ResourceTemplate>,
2943}
2944impl ::std::convert::From<&ListResourceTemplatesResult> for ListResourceTemplatesResult {
2945    fn from(value: &ListResourceTemplatesResult) -> Self {
2946        value.clone()
2947    }
2948}
2949///Sent from the client to request a list of resources the server has.
2950///
2951/// <details><summary>JSON schema</summary>
2952///
2953/// ```json
2954///{
2955///  "description": "Sent from the client to request a list of resources the server has.",
2956///  "type": "object",
2957///  "required": [
2958///    "method"
2959///  ],
2960///  "properties": {
2961///    "method": {
2962///      "type": "string",
2963///      "const": "resources/list"
2964///    },
2965///    "params": {
2966///      "type": "object",
2967///      "properties": {
2968///        "cursor": {
2969///          "description": "An opaque token representing the current pagination position.\nIf provided, the server should return results starting after this cursor.",
2970///          "type": "string"
2971///        }
2972///      }
2973///    }
2974///  }
2975///}
2976/// ```
2977/// </details>
2978#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
2979pub struct ListResourcesRequest {
2980    pub method: ::std::string::String,
2981    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2982    pub params: ::std::option::Option<ListResourcesRequestParams>,
2983}
2984impl ::std::convert::From<&ListResourcesRequest> for ListResourcesRequest {
2985    fn from(value: &ListResourcesRequest) -> Self {
2986        value.clone()
2987    }
2988}
2989///ListResourcesRequestParams
2990///
2991/// <details><summary>JSON schema</summary>
2992///
2993/// ```json
2994///{
2995///  "type": "object",
2996///  "properties": {
2997///    "cursor": {
2998///      "description": "An opaque token representing the current pagination position.\nIf provided, the server should return results starting after this cursor.",
2999///      "type": "string"
3000///    }
3001///  }
3002///}
3003/// ```
3004/// </details>
3005#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
3006pub struct ListResourcesRequestParams {
3007    ///An opaque token representing the current pagination position.
3008    ///If provided, the server should return results starting after this cursor.
3009    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3010    pub cursor: ::std::option::Option<::std::string::String>,
3011}
3012impl ::std::convert::From<&ListResourcesRequestParams> for ListResourcesRequestParams {
3013    fn from(value: &ListResourcesRequestParams) -> Self {
3014        value.clone()
3015    }
3016}
3017impl ::std::default::Default for ListResourcesRequestParams {
3018    fn default() -> Self {
3019        Self {
3020            cursor: Default::default(),
3021        }
3022    }
3023}
3024///The server's response to a resources/list request from the client.
3025///
3026/// <details><summary>JSON schema</summary>
3027///
3028/// ```json
3029///{
3030///  "description": "The server's response to a resources/list request from the client.",
3031///  "type": "object",
3032///  "required": [
3033///    "resources"
3034///  ],
3035///  "properties": {
3036///    "_meta": {
3037///      "description": "This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses.",
3038///      "type": "object",
3039///      "additionalProperties": {}
3040///    },
3041///    "nextCursor": {
3042///      "description": "An opaque token representing the pagination position after the last returned result.\nIf present, there may be more results available.",
3043///      "type": "string"
3044///    },
3045///    "resources": {
3046///      "type": "array",
3047///      "items": {
3048///        "$ref": "#/definitions/Resource"
3049///      }
3050///    }
3051///  }
3052///}
3053/// ```
3054/// </details>
3055#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq, Default)]
3056pub struct ListResourcesResult {
3057    ///This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses.
3058    #[serde(
3059        rename = "_meta",
3060        default,
3061        skip_serializing_if = "::serde_json::Map::is_empty"
3062    )]
3063    pub meta: ::serde_json::Map<::std::string::String, ::serde_json::Value>,
3064    ///An opaque token representing the pagination position after the last returned result.
3065    ///If present, there may be more results available.
3066    #[serde(
3067        rename = "nextCursor",
3068        default,
3069        skip_serializing_if = "::std::option::Option::is_none"
3070    )]
3071    pub next_cursor: ::std::option::Option<::std::string::String>,
3072    pub resources: ::std::vec::Vec<Resource>,
3073}
3074impl ::std::convert::From<&ListResourcesResult> for ListResourcesResult {
3075    fn from(value: &ListResourcesResult) -> Self {
3076        value.clone()
3077    }
3078}
3079///Sent from the server to request a list of root URIs from the client. Roots allow
3080///servers to ask for specific directories or files to operate on. A common example
3081///for roots is providing a set of repositories or directories a server should operate
3082///on.
3083///
3084///This request is typically used when the server needs to understand the file system
3085///structure or access specific locations that the client has permission to read from.
3086///
3087/// <details><summary>JSON schema</summary>
3088///
3089/// ```json
3090///{
3091///  "description": "Sent from the server to request a list of root URIs from the client. Roots allow\nservers to ask for specific directories or files to operate on. A common example\nfor roots is providing a set of repositories or directories a server should operate\non.\n\nThis request is typically used when the server needs to understand the file system\nstructure or access specific locations that the client has permission to read from.",
3092///  "type": "object",
3093///  "required": [
3094///    "method"
3095///  ],
3096///  "properties": {
3097///    "method": {
3098///      "type": "string",
3099///      "const": "roots/list"
3100///    },
3101///    "params": {
3102///      "type": "object",
3103///      "properties": {
3104///        "_meta": {
3105///          "type": "object",
3106///          "properties": {
3107///            "progressToken": {
3108///              "description": "If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.",
3109///              "$ref": "#/definitions/ProgressToken"
3110///            }
3111///          }
3112///        }
3113///      },
3114///      "additionalProperties": {}
3115///    }
3116///  }
3117///}
3118/// ```
3119/// </details>
3120#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
3121pub struct ListRootsRequest {
3122    pub method: ::std::string::String,
3123    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3124    pub params: ::std::option::Option<ListRootsRequestParams>,
3125}
3126impl ::std::convert::From<&ListRootsRequest> for ListRootsRequest {
3127    fn from(value: &ListRootsRequest) -> Self {
3128        value.clone()
3129    }
3130}
3131///ListRootsRequestParams
3132///
3133/// <details><summary>JSON schema</summary>
3134///
3135/// ```json
3136///{
3137///  "type": "object",
3138///  "properties": {
3139///    "_meta": {
3140///      "type": "object",
3141///      "properties": {
3142///        "progressToken": {
3143///          "description": "If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.",
3144///          "$ref": "#/definitions/ProgressToken"
3145///        }
3146///      }
3147///    }
3148///  },
3149///  "additionalProperties": {}
3150///}
3151/// ```
3152/// </details>
3153#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
3154pub struct ListRootsRequestParams {
3155    #[serde(
3156        rename = "_meta",
3157        default,
3158        skip_serializing_if = "::std::option::Option::is_none"
3159    )]
3160    pub meta: ::std::option::Option<ListRootsRequestParamsMeta>,
3161}
3162impl ::std::convert::From<&ListRootsRequestParams> for ListRootsRequestParams {
3163    fn from(value: &ListRootsRequestParams) -> Self {
3164        value.clone()
3165    }
3166}
3167impl ::std::default::Default for ListRootsRequestParams {
3168    fn default() -> Self {
3169        Self {
3170            meta: Default::default(),
3171        }
3172    }
3173}
3174///ListRootsRequestParamsMeta
3175///
3176/// <details><summary>JSON schema</summary>
3177///
3178/// ```json
3179///{
3180///  "type": "object",
3181///  "properties": {
3182///    "progressToken": {
3183///      "description": "If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.",
3184///      "$ref": "#/definitions/ProgressToken"
3185///    }
3186///  }
3187///}
3188/// ```
3189/// </details>
3190#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
3191pub struct ListRootsRequestParamsMeta {
3192    ///If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
3193    #[serde(
3194        rename = "progressToken",
3195        default,
3196        skip_serializing_if = "::std::option::Option::is_none"
3197    )]
3198    pub progress_token: ::std::option::Option<RequestId>,
3199}
3200impl ::std::convert::From<&ListRootsRequestParamsMeta> for ListRootsRequestParamsMeta {
3201    fn from(value: &ListRootsRequestParamsMeta) -> Self {
3202        value.clone()
3203    }
3204}
3205impl ::std::default::Default for ListRootsRequestParamsMeta {
3206    fn default() -> Self {
3207        Self {
3208            progress_token: Default::default(),
3209        }
3210    }
3211}
3212///The client's response to a roots/list request from the server.
3213///This result contains an array of Root objects, each representing a root directory
3214///or file that the server can operate on.
3215///
3216/// <details><summary>JSON schema</summary>
3217///
3218/// ```json
3219///{
3220///  "description": "The client's response to a roots/list request from the server.\nThis result contains an array of Root objects, each representing a root directory\nor file that the server can operate on.",
3221///  "type": "object",
3222///  "required": [
3223///    "roots"
3224///  ],
3225///  "properties": {
3226///    "_meta": {
3227///      "description": "This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses.",
3228///      "type": "object",
3229///      "additionalProperties": {}
3230///    },
3231///    "roots": {
3232///      "type": "array",
3233///      "items": {
3234///        "$ref": "#/definitions/Root"
3235///      }
3236///    }
3237///  }
3238///}
3239/// ```
3240/// </details>
3241#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
3242pub struct ListRootsResult {
3243    ///This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses.
3244    #[serde(
3245        rename = "_meta",
3246        default,
3247        skip_serializing_if = "::serde_json::Map::is_empty"
3248    )]
3249    pub meta: ::serde_json::Map<::std::string::String, ::serde_json::Value>,
3250    pub roots: ::std::vec::Vec<Root>,
3251}
3252impl ::std::convert::From<&ListRootsResult> for ListRootsResult {
3253    fn from(value: &ListRootsResult) -> Self {
3254        value.clone()
3255    }
3256}
3257///Sent from the client to request a list of tools the server has.
3258///
3259/// <details><summary>JSON schema</summary>
3260///
3261/// ```json
3262///{
3263///  "description": "Sent from the client to request a list of tools the server has.",
3264///  "type": "object",
3265///  "required": [
3266///    "method"
3267///  ],
3268///  "properties": {
3269///    "method": {
3270///      "type": "string",
3271///      "const": "tools/list"
3272///    },
3273///    "params": {
3274///      "type": "object",
3275///      "properties": {
3276///        "cursor": {
3277///          "description": "An opaque token representing the current pagination position.\nIf provided, the server should return results starting after this cursor.",
3278///          "type": "string"
3279///        }
3280///      }
3281///    }
3282///  }
3283///}
3284/// ```
3285/// </details>
3286#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
3287pub struct ListToolsRequest {
3288    pub method: ::std::string::String,
3289    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3290    pub params: ::std::option::Option<ListToolsRequestParams>,
3291}
3292impl ::std::convert::From<&ListToolsRequest> for ListToolsRequest {
3293    fn from(value: &ListToolsRequest) -> Self {
3294        value.clone()
3295    }
3296}
3297///ListToolsRequestParams
3298///
3299/// <details><summary>JSON schema</summary>
3300///
3301/// ```json
3302///{
3303///  "type": "object",
3304///  "properties": {
3305///    "cursor": {
3306///      "description": "An opaque token representing the current pagination position.\nIf provided, the server should return results starting after this cursor.",
3307///      "type": "string"
3308///    }
3309///  }
3310///}
3311/// ```
3312/// </details>
3313#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
3314pub struct ListToolsRequestParams {
3315    ///An opaque token representing the current pagination position.
3316    ///If provided, the server should return results starting after this cursor.
3317    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3318    pub cursor: ::std::option::Option<::std::string::String>,
3319}
3320impl ::std::convert::From<&ListToolsRequestParams> for ListToolsRequestParams {
3321    fn from(value: &ListToolsRequestParams) -> Self {
3322        value.clone()
3323    }
3324}
3325impl ::std::default::Default for ListToolsRequestParams {
3326    fn default() -> Self {
3327        Self {
3328            cursor: Default::default(),
3329        }
3330    }
3331}
3332///The server's response to a tools/list request from the client.
3333///
3334/// <details><summary>JSON schema</summary>
3335///
3336/// ```json
3337///{
3338///  "description": "The server's response to a tools/list request from the client.",
3339///  "type": "object",
3340///  "required": [
3341///    "tools"
3342///  ],
3343///  "properties": {
3344///    "_meta": {
3345///      "description": "This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses.",
3346///      "type": "object",
3347///      "additionalProperties": {}
3348///    },
3349///    "nextCursor": {
3350///      "description": "An opaque token representing the pagination position after the last returned result.\nIf present, there may be more results available.",
3351///      "type": "string"
3352///    },
3353///    "tools": {
3354///      "type": "array",
3355///      "items": {
3356///        "$ref": "#/definitions/Tool"
3357///      }
3358///    }
3359///  }
3360///}
3361/// ```
3362/// </details>
3363#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq, Default)]
3364pub struct ListToolsResult {
3365    ///This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses.
3366    #[serde(
3367        rename = "_meta",
3368        default,
3369        skip_serializing_if = "::serde_json::Map::is_empty"
3370    )]
3371    pub meta: ::serde_json::Map<::std::string::String, ::serde_json::Value>,
3372    ///An opaque token representing the pagination position after the last returned result.
3373    ///If present, there may be more results available.
3374    #[serde(
3375        rename = "nextCursor",
3376        default,
3377        skip_serializing_if = "::std::option::Option::is_none"
3378    )]
3379    pub next_cursor: ::std::option::Option<::std::string::String>,
3380    pub tools: ::std::vec::Vec<Tool>,
3381}
3382impl ::std::convert::From<&ListToolsResult> for ListToolsResult {
3383    fn from(value: &ListToolsResult) -> Self {
3384        value.clone()
3385    }
3386}
3387///The severity of a log message.
3388///
3389///These map to syslog message severities, as specified in RFC-5424:
3390///https://datatracker.ietf.org/doc/html/rfc5424#section-6.2.1
3391///
3392/// <details><summary>JSON schema</summary>
3393///
3394/// ```json
3395///{
3396///  "description": "The severity of a log message.\n\nThese map to syslog message severities, as specified in RFC-5424:\nhttps://datatracker.ietf.org/doc/html/rfc5424#section-6.2.1",
3397///  "type": "string",
3398///  "enum": [
3399///    "alert",
3400///    "critical",
3401///    "debug",
3402///    "emergency",
3403///    "error",
3404///    "info",
3405///    "notice",
3406///    "warning"
3407///  ]
3408///}
3409/// ```
3410/// </details>
3411#[derive(
3412    :: serde :: Deserialize,
3413    :: serde :: Serialize,
3414    Clone,
3415    Copy,
3416    Debug,
3417    Eq,
3418    Hash,
3419    Ord,
3420    PartialEq,
3421    PartialOrd,
3422)]
3423pub enum LoggingLevel {
3424    #[serde(rename = "alert")]
3425    Alert,
3426    #[serde(rename = "critical")]
3427    Critical,
3428    #[serde(rename = "debug")]
3429    Debug,
3430    #[serde(rename = "emergency")]
3431    Emergency,
3432    #[serde(rename = "error")]
3433    Error,
3434    #[serde(rename = "info")]
3435    Info,
3436    #[serde(rename = "notice")]
3437    Notice,
3438    #[serde(rename = "warning")]
3439    Warning,
3440}
3441impl ::std::convert::From<&Self> for LoggingLevel {
3442    fn from(value: &LoggingLevel) -> Self {
3443        value.clone()
3444    }
3445}
3446impl ::std::fmt::Display for LoggingLevel {
3447    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3448        match *self {
3449            Self::Alert => write!(f, "alert"),
3450            Self::Critical => write!(f, "critical"),
3451            Self::Debug => write!(f, "debug"),
3452            Self::Emergency => write!(f, "emergency"),
3453            Self::Error => write!(f, "error"),
3454            Self::Info => write!(f, "info"),
3455            Self::Notice => write!(f, "notice"),
3456            Self::Warning => write!(f, "warning"),
3457        }
3458    }
3459}
3460impl ::std::str::FromStr for LoggingLevel {
3461    type Err = self::error::ConversionError;
3462    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3463        match value {
3464            "alert" => Ok(Self::Alert),
3465            "critical" => Ok(Self::Critical),
3466            "debug" => Ok(Self::Debug),
3467            "emergency" => Ok(Self::Emergency),
3468            "error" => Ok(Self::Error),
3469            "info" => Ok(Self::Info),
3470            "notice" => Ok(Self::Notice),
3471            "warning" => Ok(Self::Warning),
3472            _ => Err("invalid value".into()),
3473        }
3474    }
3475}
3476impl ::std::convert::TryFrom<&str> for LoggingLevel {
3477    type Error = self::error::ConversionError;
3478    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3479        value.parse()
3480    }
3481}
3482impl ::std::convert::TryFrom<&::std::string::String> for LoggingLevel {
3483    type Error = self::error::ConversionError;
3484    fn try_from(
3485        value: &::std::string::String,
3486    ) -> ::std::result::Result<Self, self::error::ConversionError> {
3487        value.parse()
3488    }
3489}
3490impl ::std::convert::TryFrom<::std::string::String> for LoggingLevel {
3491    type Error = self::error::ConversionError;
3492    fn try_from(
3493        value: ::std::string::String,
3494    ) -> ::std::result::Result<Self, self::error::ConversionError> {
3495        value.parse()
3496    }
3497}
3498///Notification of a log message passed from server to client. If no logging/setLevel request has been sent from the client, the server MAY decide which messages to send automatically.
3499///
3500/// <details><summary>JSON schema</summary>
3501///
3502/// ```json
3503///{
3504///  "description": "Notification of a log message passed from server to client. If no logging/setLevel request has been sent from the client, the server MAY decide which messages to send automatically.",
3505///  "type": "object",
3506///  "required": [
3507///    "method",
3508///    "params"
3509///  ],
3510///  "properties": {
3511///    "method": {
3512///      "type": "string",
3513///      "const": "notifications/message"
3514///    },
3515///    "params": {
3516///      "type": "object",
3517///      "required": [
3518///        "data",
3519///        "level"
3520///      ],
3521///      "properties": {
3522///        "data": {
3523///          "description": "The data to be logged, such as a string message or an object. Any JSON serializable type is allowed here."
3524///        },
3525///        "level": {
3526///          "description": "The severity of this log message.",
3527///          "$ref": "#/definitions/LoggingLevel"
3528///        },
3529///        "logger": {
3530///          "description": "An optional name of the logger issuing this message.",
3531///          "type": "string"
3532///        }
3533///      }
3534///    }
3535///  }
3536///}
3537/// ```
3538/// </details>
3539#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
3540pub struct LoggingMessageNotification {
3541    pub method: ::std::string::String,
3542    pub params: LoggingMessageNotificationParams,
3543}
3544impl ::std::convert::From<&LoggingMessageNotification> for LoggingMessageNotification {
3545    fn from(value: &LoggingMessageNotification) -> Self {
3546        value.clone()
3547    }
3548}
3549///LoggingMessageNotificationParams
3550///
3551/// <details><summary>JSON schema</summary>
3552///
3553/// ```json
3554///{
3555///  "type": "object",
3556///  "required": [
3557///    "data",
3558///    "level"
3559///  ],
3560///  "properties": {
3561///    "data": {
3562///      "description": "The data to be logged, such as a string message or an object. Any JSON serializable type is allowed here."
3563///    },
3564///    "level": {
3565///      "description": "The severity of this log message.",
3566///      "$ref": "#/definitions/LoggingLevel"
3567///    },
3568///    "logger": {
3569///      "description": "An optional name of the logger issuing this message.",
3570///      "type": "string"
3571///    }
3572///  }
3573///}
3574/// ```
3575/// </details>
3576#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
3577pub struct LoggingMessageNotificationParams {
3578    ///The data to be logged, such as a string message or an object. Any JSON serializable type is allowed here.
3579    pub data: ::serde_json::Value,
3580    ///The severity of this log message.
3581    pub level: LoggingLevel,
3582    ///An optional name of the logger issuing this message.
3583    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3584    pub logger: ::std::option::Option<::std::string::String>,
3585}
3586impl ::std::convert::From<&LoggingMessageNotificationParams> for LoggingMessageNotificationParams {
3587    fn from(value: &LoggingMessageNotificationParams) -> Self {
3588        value.clone()
3589    }
3590}
3591///Hints to use for model selection.
3592///
3593///Keys not declared here are currently left unspecified by the spec and are up
3594///to the client to interpret.
3595///
3596/// <details><summary>JSON schema</summary>
3597///
3598/// ```json
3599///{
3600///  "description": "Hints to use for model selection.\n\nKeys not declared here are currently left unspecified by the spec and are up\nto the client to interpret.",
3601///  "type": "object",
3602///  "properties": {
3603///    "name": {
3604///      "description": "A hint for a model name.\n\nThe client SHOULD treat this as a substring of a model name; for example:\n - `claude-3-5-sonnet` should match `claude-3-5-sonnet-20241022`\n - `sonnet` should match `claude-3-5-sonnet-20241022`, `claude-3-sonnet-20240229`, etc.\n - `claude` should match any Claude model\n\nThe client MAY also map the string to a different provider's model name or a different model family, as long as it fills a similar niche; for example:\n - `gemini-1.5-flash` could match `claude-3-haiku-20240307`",
3605///      "type": "string"
3606///    }
3607///  }
3608///}
3609/// ```
3610/// </details>
3611#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
3612pub struct ModelHint {
3613    ///A hint for a model name.
3614    ///
3615    ///The client SHOULD treat this as a substring of a model name; for example:
3616    /// - `claude-3-5-sonnet` should match `claude-3-5-sonnet-20241022`
3617    /// - `sonnet` should match `claude-3-5-sonnet-20241022`, `claude-3-sonnet-20240229`, etc.
3618    /// - `claude` should match any Claude model
3619    ///
3620    ///The client MAY also map the string to a different provider's model name or a different model family, as long as it fills a similar niche; for example:
3621    /// - `gemini-1.5-flash` could match `claude-3-haiku-20240307`
3622    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3623    pub name: ::std::option::Option<::std::string::String>,
3624}
3625impl ::std::convert::From<&ModelHint> for ModelHint {
3626    fn from(value: &ModelHint) -> Self {
3627        value.clone()
3628    }
3629}
3630impl ::std::default::Default for ModelHint {
3631    fn default() -> Self {
3632        Self {
3633            name: Default::default(),
3634        }
3635    }
3636}
3637///The server's preferences for model selection, requested of the client during sampling.
3638///
3639///Because LLMs can vary along multiple dimensions, choosing the "best" model is
3640///rarely straightforward.  Different models excel in different areas—some are
3641///faster but less capable, others are more capable but more expensive, and so
3642///on. This interface allows servers to express their priorities across multiple
3643///dimensions to help clients make an appropriate selection for their use case.
3644///
3645///These preferences are always advisory. The client MAY ignore them. It is also
3646///up to the client to decide how to interpret these preferences and how to
3647///balance them against other considerations.
3648///
3649/// <details><summary>JSON schema</summary>
3650///
3651/// ```json
3652///{
3653///  "description": "The server's preferences for model selection, requested of the client during sampling.\n\nBecause LLMs can vary along multiple dimensions, choosing the \"best\" model is\nrarely straightforward.  Different models excel in different areas—some are\nfaster but less capable, others are more capable but more expensive, and so\non. This interface allows servers to express their priorities across multiple\ndimensions to help clients make an appropriate selection for their use case.\n\nThese preferences are always advisory. The client MAY ignore them. It is also\nup to the client to decide how to interpret these preferences and how to\nbalance them against other considerations.",
3654///  "type": "object",
3655///  "properties": {
3656///    "costPriority": {
3657///      "description": "How much to prioritize cost when selecting a model. A value of 0 means cost\nis not important, while a value of 1 means cost is the most important\nfactor.",
3658///      "type": "number",
3659///      "maximum": 1.0,
3660///      "minimum": 0.0
3661///    },
3662///    "hints": {
3663///      "description": "Optional hints to use for model selection.\n\nIf multiple hints are specified, the client MUST evaluate them in order\n(such that the first match is taken).\n\nThe client SHOULD prioritize these hints over the numeric priorities, but\nMAY still use the priorities to select from ambiguous matches.",
3664///      "type": "array",
3665///      "items": {
3666///        "$ref": "#/definitions/ModelHint"
3667///      }
3668///    },
3669///    "intelligencePriority": {
3670///      "description": "How much to prioritize intelligence and capabilities when selecting a\nmodel. A value of 0 means intelligence is not important, while a value of 1\nmeans intelligence is the most important factor.",
3671///      "type": "number",
3672///      "maximum": 1.0,
3673///      "minimum": 0.0
3674///    },
3675///    "speedPriority": {
3676///      "description": "How much to prioritize sampling speed (latency) when selecting a model. A\nvalue of 0 means speed is not important, while a value of 1 means speed is\nthe most important factor.",
3677///      "type": "number",
3678///      "maximum": 1.0,
3679///      "minimum": 0.0
3680///    }
3681///  }
3682///}
3683/// ```
3684/// </details>
3685#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
3686pub struct ModelPreferences {
3687    #[serde(
3688        rename = "costPriority",
3689        default,
3690        skip_serializing_if = "::std::option::Option::is_none"
3691    )]
3692    pub cost_priority: ::std::option::Option<f64>,
3693    ///Optional hints to use for model selection.
3694    ///
3695    ///If multiple hints are specified, the client MUST evaluate them in order
3696    ///(such that the first match is taken).
3697    ///
3698    ///The client SHOULD prioritize these hints over the numeric priorities, but
3699    ///MAY still use the priorities to select from ambiguous matches.
3700    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
3701    pub hints: ::std::vec::Vec<ModelHint>,
3702    #[serde(
3703        rename = "intelligencePriority",
3704        default,
3705        skip_serializing_if = "::std::option::Option::is_none"
3706    )]
3707    pub intelligence_priority: ::std::option::Option<f64>,
3708    #[serde(
3709        rename = "speedPriority",
3710        default,
3711        skip_serializing_if = "::std::option::Option::is_none"
3712    )]
3713    pub speed_priority: ::std::option::Option<f64>,
3714}
3715impl ::std::convert::From<&ModelPreferences> for ModelPreferences {
3716    fn from(value: &ModelPreferences) -> Self {
3717        value.clone()
3718    }
3719}
3720impl ::std::default::Default for ModelPreferences {
3721    fn default() -> Self {
3722        Self {
3723            cost_priority: Default::default(),
3724            hints: Default::default(),
3725            intelligence_priority: Default::default(),
3726            speed_priority: Default::default(),
3727        }
3728    }
3729}
3730///Notification
3731///
3732/// <details><summary>JSON schema</summary>
3733///
3734/// ```json
3735///{
3736///  "type": "object",
3737///  "required": [
3738///    "method"
3739///  ],
3740///  "properties": {
3741///    "method": {
3742///      "type": "string"
3743///    },
3744///    "params": {
3745///      "type": "object",
3746///      "properties": {
3747///        "_meta": {
3748///          "description": "This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications.",
3749///          "type": "object",
3750///          "additionalProperties": {}
3751///        }
3752///      },
3753///      "additionalProperties": {}
3754///    }
3755///  }
3756///}
3757/// ```
3758/// </details>
3759#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
3760pub struct Notification {
3761    pub method: ::std::string::String,
3762    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3763    pub params: ::std::option::Option<NotificationParams>,
3764}
3765impl ::std::convert::From<&Notification> for Notification {
3766    fn from(value: &Notification) -> Self {
3767        value.clone()
3768    }
3769}
3770///NotificationParams
3771///
3772/// <details><summary>JSON schema</summary>
3773///
3774/// ```json
3775///{
3776///  "type": "object",
3777///  "properties": {
3778///    "_meta": {
3779///      "description": "This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications.",
3780///      "type": "object",
3781///      "additionalProperties": {}
3782///    }
3783///  },
3784///  "additionalProperties": {}
3785///}
3786/// ```
3787/// </details>
3788#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
3789pub struct NotificationParams {
3790    ///This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications.
3791    #[serde(
3792        rename = "_meta",
3793        default,
3794        skip_serializing_if = "::serde_json::Map::is_empty"
3795    )]
3796    pub meta: ::serde_json::Map<::std::string::String, ::serde_json::Value>,
3797}
3798impl ::std::convert::From<&NotificationParams> for NotificationParams {
3799    fn from(value: &NotificationParams) -> Self {
3800        value.clone()
3801    }
3802}
3803impl ::std::default::Default for NotificationParams {
3804    fn default() -> Self {
3805        Self {
3806            meta: Default::default(),
3807        }
3808    }
3809}
3810///PaginatedRequest
3811///
3812/// <details><summary>JSON schema</summary>
3813///
3814/// ```json
3815///{
3816///  "type": "object",
3817///  "required": [
3818///    "method"
3819///  ],
3820///  "properties": {
3821///    "method": {
3822///      "type": "string"
3823///    },
3824///    "params": {
3825///      "type": "object",
3826///      "properties": {
3827///        "cursor": {
3828///          "description": "An opaque token representing the current pagination position.\nIf provided, the server should return results starting after this cursor.",
3829///          "type": "string"
3830///        }
3831///      }
3832///    }
3833///  }
3834///}
3835/// ```
3836/// </details>
3837#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
3838pub struct PaginatedRequest {
3839    pub method: ::std::string::String,
3840    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3841    pub params: ::std::option::Option<PaginatedRequestParams>,
3842}
3843impl ::std::convert::From<&PaginatedRequest> for PaginatedRequest {
3844    fn from(value: &PaginatedRequest) -> Self {
3845        value.clone()
3846    }
3847}
3848///PaginatedRequestParams
3849///
3850/// <details><summary>JSON schema</summary>
3851///
3852/// ```json
3853///{
3854///  "type": "object",
3855///  "properties": {
3856///    "cursor": {
3857///      "description": "An opaque token representing the current pagination position.\nIf provided, the server should return results starting after this cursor.",
3858///      "type": "string"
3859///    }
3860///  }
3861///}
3862/// ```
3863/// </details>
3864#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
3865pub struct PaginatedRequestParams {
3866    ///An opaque token representing the current pagination position.
3867    ///If provided, the server should return results starting after this cursor.
3868    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3869    pub cursor: ::std::option::Option<::std::string::String>,
3870}
3871impl ::std::convert::From<&PaginatedRequestParams> for PaginatedRequestParams {
3872    fn from(value: &PaginatedRequestParams) -> Self {
3873        value.clone()
3874    }
3875}
3876impl ::std::default::Default for PaginatedRequestParams {
3877    fn default() -> Self {
3878        Self {
3879            cursor: Default::default(),
3880        }
3881    }
3882}
3883///PaginatedResult
3884///
3885/// <details><summary>JSON schema</summary>
3886///
3887/// ```json
3888///{
3889///  "type": "object",
3890///  "properties": {
3891///    "_meta": {
3892///      "description": "This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses.",
3893///      "type": "object",
3894///      "additionalProperties": {}
3895///    },
3896///    "nextCursor": {
3897///      "description": "An opaque token representing the pagination position after the last returned result.\nIf present, there may be more results available.",
3898///      "type": "string"
3899///    }
3900///  }
3901///}
3902/// ```
3903/// </details>
3904#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
3905pub struct PaginatedResult {
3906    ///This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses.
3907    #[serde(
3908        rename = "_meta",
3909        default,
3910        skip_serializing_if = "::serde_json::Map::is_empty"
3911    )]
3912    pub meta: ::serde_json::Map<::std::string::String, ::serde_json::Value>,
3913    ///An opaque token representing the pagination position after the last returned result.
3914    ///If present, there may be more results available.
3915    #[serde(
3916        rename = "nextCursor",
3917        default,
3918        skip_serializing_if = "::std::option::Option::is_none"
3919    )]
3920    pub next_cursor: ::std::option::Option<::std::string::String>,
3921}
3922impl ::std::convert::From<&PaginatedResult> for PaginatedResult {
3923    fn from(value: &PaginatedResult) -> Self {
3924        value.clone()
3925    }
3926}
3927impl ::std::default::Default for PaginatedResult {
3928    fn default() -> Self {
3929        Self {
3930            meta: Default::default(),
3931            next_cursor: Default::default(),
3932        }
3933    }
3934}
3935///A ping, issued by either the server or the client, to check that the other party is still alive. The receiver must promptly respond, or else may be disconnected.
3936///
3937/// <details><summary>JSON schema</summary>
3938///
3939/// ```json
3940///{
3941///  "description": "A ping, issued by either the server or the client, to check that the other party is still alive. The receiver must promptly respond, or else may be disconnected.",
3942///  "type": "object",
3943///  "required": [
3944///    "method"
3945///  ],
3946///  "properties": {
3947///    "method": {
3948///      "type": "string",
3949///      "const": "ping"
3950///    },
3951///    "params": {
3952///      "type": "object",
3953///      "properties": {
3954///        "_meta": {
3955///          "type": "object",
3956///          "properties": {
3957///            "progressToken": {
3958///              "description": "If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.",
3959///              "$ref": "#/definitions/ProgressToken"
3960///            }
3961///          }
3962///        }
3963///      },
3964///      "additionalProperties": {}
3965///    }
3966///  }
3967///}
3968/// ```
3969/// </details>
3970#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
3971pub struct PingRequest {
3972    pub method: ::std::string::String,
3973    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3974    pub params: ::std::option::Option<PingRequestParams>,
3975}
3976impl ::std::convert::From<&PingRequest> for PingRequest {
3977    fn from(value: &PingRequest) -> Self {
3978        value.clone()
3979    }
3980}
3981///PingRequestParams
3982///
3983/// <details><summary>JSON schema</summary>
3984///
3985/// ```json
3986///{
3987///  "type": "object",
3988///  "properties": {
3989///    "_meta": {
3990///      "type": "object",
3991///      "properties": {
3992///        "progressToken": {
3993///          "description": "If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.",
3994///          "$ref": "#/definitions/ProgressToken"
3995///        }
3996///      }
3997///    }
3998///  },
3999///  "additionalProperties": {}
4000///}
4001/// ```
4002/// </details>
4003#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
4004pub struct PingRequestParams {
4005    #[serde(
4006        rename = "_meta",
4007        default,
4008        skip_serializing_if = "::std::option::Option::is_none"
4009    )]
4010    pub meta: ::std::option::Option<PingRequestParamsMeta>,
4011}
4012impl ::std::convert::From<&PingRequestParams> for PingRequestParams {
4013    fn from(value: &PingRequestParams) -> Self {
4014        value.clone()
4015    }
4016}
4017impl ::std::default::Default for PingRequestParams {
4018    fn default() -> Self {
4019        Self {
4020            meta: Default::default(),
4021        }
4022    }
4023}
4024///PingRequestParamsMeta
4025///
4026/// <details><summary>JSON schema</summary>
4027///
4028/// ```json
4029///{
4030///  "type": "object",
4031///  "properties": {
4032///    "progressToken": {
4033///      "description": "If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.",
4034///      "$ref": "#/definitions/ProgressToken"
4035///    }
4036///  }
4037///}
4038/// ```
4039/// </details>
4040#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
4041pub struct PingRequestParamsMeta {
4042    ///If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
4043    #[serde(
4044        rename = "progressToken",
4045        default,
4046        skip_serializing_if = "::std::option::Option::is_none"
4047    )]
4048    pub progress_token: ::std::option::Option<RequestId>,
4049}
4050impl ::std::convert::From<&PingRequestParamsMeta> for PingRequestParamsMeta {
4051    fn from(value: &PingRequestParamsMeta) -> Self {
4052        value.clone()
4053    }
4054}
4055impl ::std::default::Default for PingRequestParamsMeta {
4056    fn default() -> Self {
4057        Self {
4058            progress_token: Default::default(),
4059        }
4060    }
4061}
4062///An out-of-band notification used to inform the receiver of a progress update for a long-running request.
4063///
4064/// <details><summary>JSON schema</summary>
4065///
4066/// ```json
4067///{
4068///  "description": "An out-of-band notification used to inform the receiver of a progress update for a long-running request.",
4069///  "type": "object",
4070///  "required": [
4071///    "method",
4072///    "params"
4073///  ],
4074///  "properties": {
4075///    "method": {
4076///      "type": "string",
4077///      "const": "notifications/progress"
4078///    },
4079///    "params": {
4080///      "type": "object",
4081///      "required": [
4082///        "progress",
4083///        "progressToken"
4084///      ],
4085///      "properties": {
4086///        "progress": {
4087///          "description": "The progress thus far. This should increase every time progress is made, even if the total is unknown.",
4088///          "type": "number"
4089///        },
4090///        "progressToken": {
4091///          "description": "The progress token which was given in the initial request, used to associate this notification with the request that is proceeding.",
4092///          "$ref": "#/definitions/ProgressToken"
4093///        },
4094///        "total": {
4095///          "description": "Total number of items to process (or total progress required), if known.",
4096///          "type": "number"
4097///        }
4098///      }
4099///    }
4100///  }
4101///}
4102/// ```
4103/// </details>
4104#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
4105pub struct ProgressNotification {
4106    pub method: ::std::string::String,
4107    pub params: ProgressNotificationParams,
4108}
4109impl ::std::convert::From<&ProgressNotification> for ProgressNotification {
4110    fn from(value: &ProgressNotification) -> Self {
4111        value.clone()
4112    }
4113}
4114///ProgressNotificationParams
4115///
4116/// <details><summary>JSON schema</summary>
4117///
4118/// ```json
4119///{
4120///  "type": "object",
4121///  "required": [
4122///    "progress",
4123///    "progressToken"
4124///  ],
4125///  "properties": {
4126///    "progress": {
4127///      "description": "The progress thus far. This should increase every time progress is made, even if the total is unknown.",
4128///      "type": "number"
4129///    },
4130///    "progressToken": {
4131///      "description": "The progress token which was given in the initial request, used to associate this notification with the request that is proceeding.",
4132///      "$ref": "#/definitions/ProgressToken"
4133///    },
4134///    "total": {
4135///      "description": "Total number of items to process (or total progress required), if known.",
4136///      "type": "number"
4137///    }
4138///  }
4139///}
4140/// ```
4141/// </details>
4142#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
4143pub struct ProgressNotificationParams {
4144    pub progress: f64,
4145    ///The progress token which was given in the initial request, used to associate this notification with the request that is proceeding.
4146    #[serde(rename = "progressToken")]
4147    pub progress_token: RequestId,
4148    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4149    pub total: ::std::option::Option<f64>,
4150}
4151impl ::std::convert::From<&ProgressNotificationParams> for ProgressNotificationParams {
4152    fn from(value: &ProgressNotificationParams) -> Self {
4153        value.clone()
4154    }
4155}
4156///A prompt or prompt template that the server offers.
4157///
4158/// <details><summary>JSON schema</summary>
4159///
4160/// ```json
4161///{
4162///  "description": "A prompt or prompt template that the server offers.",
4163///  "type": "object",
4164///  "required": [
4165///    "name"
4166///  ],
4167///  "properties": {
4168///    "arguments": {
4169///      "description": "A list of arguments to use for templating the prompt.",
4170///      "type": "array",
4171///      "items": {
4172///        "$ref": "#/definitions/PromptArgument"
4173///      }
4174///    },
4175///    "description": {
4176///      "description": "An optional description of what this prompt provides",
4177///      "type": "string"
4178///    },
4179///    "name": {
4180///      "description": "The name of the prompt or prompt template.",
4181///      "type": "string"
4182///    }
4183///  }
4184///}
4185/// ```
4186/// </details>
4187#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
4188pub struct Prompt {
4189    ///A list of arguments to use for templating the prompt.
4190    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
4191    pub arguments: ::std::vec::Vec<PromptArgument>,
4192    ///An optional description of what this prompt provides
4193    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4194    pub description: ::std::option::Option<::std::string::String>,
4195    ///The name of the prompt or prompt template.
4196    pub name: ::std::string::String,
4197}
4198impl ::std::convert::From<&Prompt> for Prompt {
4199    fn from(value: &Prompt) -> Self {
4200        value.clone()
4201    }
4202}
4203///Describes an argument that a prompt can accept.
4204///
4205/// <details><summary>JSON schema</summary>
4206///
4207/// ```json
4208///{
4209///  "description": "Describes an argument that a prompt can accept.",
4210///  "type": "object",
4211///  "required": [
4212///    "name"
4213///  ],
4214///  "properties": {
4215///    "description": {
4216///      "description": "A human-readable description of the argument.",
4217///      "type": "string"
4218///    },
4219///    "name": {
4220///      "description": "The name of the argument.",
4221///      "type": "string"
4222///    },
4223///    "required": {
4224///      "description": "Whether this argument must be provided.",
4225///      "type": "boolean"
4226///    }
4227///  }
4228///}
4229/// ```
4230/// </details>
4231#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
4232pub struct PromptArgument {
4233    ///A human-readable description of the argument.
4234    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4235    pub description: ::std::option::Option<::std::string::String>,
4236    ///The name of the argument.
4237    pub name: ::std::string::String,
4238    ///Whether this argument must be provided.
4239    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4240    pub required: ::std::option::Option<bool>,
4241}
4242impl ::std::convert::From<&PromptArgument> for PromptArgument {
4243    fn from(value: &PromptArgument) -> Self {
4244        value.clone()
4245    }
4246}
4247///An optional notification from the server to the client, informing it that the list of prompts it offers has changed. This may be issued by servers without any previous subscription from the client.
4248///
4249/// <details><summary>JSON schema</summary>
4250///
4251/// ```json
4252///{
4253///  "description": "An optional notification from the server to the client, informing it that the list of prompts it offers has changed. This may be issued by servers without any previous subscription from the client.",
4254///  "type": "object",
4255///  "required": [
4256///    "method"
4257///  ],
4258///  "properties": {
4259///    "method": {
4260///      "type": "string",
4261///      "const": "notifications/prompts/list_changed"
4262///    },
4263///    "params": {
4264///      "type": "object",
4265///      "properties": {
4266///        "_meta": {
4267///          "description": "This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications.",
4268///          "type": "object",
4269///          "additionalProperties": {}
4270///        }
4271///      },
4272///      "additionalProperties": {}
4273///    }
4274///  }
4275///}
4276/// ```
4277/// </details>
4278#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
4279pub struct PromptListChangedNotification {
4280    pub method: ::std::string::String,
4281    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4282    pub params: ::std::option::Option<PromptListChangedNotificationParams>,
4283}
4284impl ::std::convert::From<&PromptListChangedNotification> for PromptListChangedNotification {
4285    fn from(value: &PromptListChangedNotification) -> Self {
4286        value.clone()
4287    }
4288}
4289///PromptListChangedNotificationParams
4290///
4291/// <details><summary>JSON schema</summary>
4292///
4293/// ```json
4294///{
4295///  "type": "object",
4296///  "properties": {
4297///    "_meta": {
4298///      "description": "This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications.",
4299///      "type": "object",
4300///      "additionalProperties": {}
4301///    }
4302///  },
4303///  "additionalProperties": {}
4304///}
4305/// ```
4306/// </details>
4307#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
4308pub struct PromptListChangedNotificationParams {
4309    ///This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications.
4310    #[serde(
4311        rename = "_meta",
4312        default,
4313        skip_serializing_if = "::serde_json::Map::is_empty"
4314    )]
4315    pub meta: ::serde_json::Map<::std::string::String, ::serde_json::Value>,
4316}
4317impl ::std::convert::From<&PromptListChangedNotificationParams>
4318    for PromptListChangedNotificationParams
4319{
4320    fn from(value: &PromptListChangedNotificationParams) -> Self {
4321        value.clone()
4322    }
4323}
4324impl ::std::default::Default for PromptListChangedNotificationParams {
4325    fn default() -> Self {
4326        Self {
4327            meta: Default::default(),
4328        }
4329    }
4330}
4331///Describes a message returned as part of a prompt.
4332///
4333///This is similar to `SamplingMessage`, but also supports the embedding of
4334///resources from the MCP server.
4335///
4336/// <details><summary>JSON schema</summary>
4337///
4338/// ```json
4339///{
4340///  "description": "Describes a message returned as part of a prompt.\n\nThis is similar to `SamplingMessage`, but also supports the embedding of\nresources from the MCP server.",
4341///  "type": "object",
4342///  "required": [
4343///    "content",
4344///    "role"
4345///  ],
4346///  "properties": {
4347///    "content": {
4348///      "anyOf": [
4349///        {
4350///          "$ref": "#/definitions/TextContent"
4351///        },
4352///        {
4353///          "$ref": "#/definitions/ImageContent"
4354///        },
4355///        {
4356///          "$ref": "#/definitions/EmbeddedResource"
4357///        }
4358///      ]
4359///    },
4360///    "role": {
4361///      "$ref": "#/definitions/Role"
4362///    }
4363///  }
4364///}
4365/// ```
4366/// </details>
4367#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
4368pub struct PromptMessage {
4369    pub content: PromptMessageContent,
4370    pub role: Role,
4371}
4372impl ::std::convert::From<&PromptMessage> for PromptMessage {
4373    fn from(value: &PromptMessage) -> Self {
4374        value.clone()
4375    }
4376}
4377///PromptMessageContent
4378///
4379/// <details><summary>JSON schema</summary>
4380///
4381/// ```json
4382///{
4383///  "anyOf": [
4384///    {
4385///      "$ref": "#/definitions/TextContent"
4386///    },
4387///    {
4388///      "$ref": "#/definitions/ImageContent"
4389///    },
4390///    {
4391///      "$ref": "#/definitions/EmbeddedResource"
4392///    }
4393///  ]
4394///}
4395/// ```
4396/// </details>
4397#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
4398#[serde(untagged)]
4399pub enum PromptMessageContent {
4400    TextContent(TextContent),
4401    ImageContent(ImageContent),
4402    EmbeddedResource(EmbeddedResource),
4403}
4404impl ::std::convert::From<&Self> for PromptMessageContent {
4405    fn from(value: &PromptMessageContent) -> Self {
4406        value.clone()
4407    }
4408}
4409impl ::std::convert::From<TextContent> for PromptMessageContent {
4410    fn from(value: TextContent) -> Self {
4411        Self::TextContent(value)
4412    }
4413}
4414impl ::std::convert::From<ImageContent> for PromptMessageContent {
4415    fn from(value: ImageContent) -> Self {
4416        Self::ImageContent(value)
4417    }
4418}
4419impl ::std::convert::From<EmbeddedResource> for PromptMessageContent {
4420    fn from(value: EmbeddedResource) -> Self {
4421        Self::EmbeddedResource(value)
4422    }
4423}
4424///Identifies a prompt.
4425///
4426/// <details><summary>JSON schema</summary>
4427///
4428/// ```json
4429///{
4430///  "description": "Identifies a prompt.",
4431///  "type": "object",
4432///  "required": [
4433///    "name",
4434///    "type"
4435///  ],
4436///  "properties": {
4437///    "name": {
4438///      "description": "The name of the prompt or prompt template",
4439///      "type": "string"
4440///    },
4441///    "type": {
4442///      "type": "string",
4443///      "const": "ref/prompt"
4444///    }
4445///  }
4446///}
4447/// ```
4448/// </details>
4449#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
4450pub struct PromptReference {
4451    ///The name of the prompt or prompt template
4452    pub name: ::std::string::String,
4453    #[serde(rename = "type")]
4454    pub type_: ::std::string::String,
4455}
4456impl ::std::convert::From<&PromptReference> for PromptReference {
4457    fn from(value: &PromptReference) -> Self {
4458        value.clone()
4459    }
4460}
4461///Sent from the client to the server, to read a specific resource URI.
4462///
4463/// <details><summary>JSON schema</summary>
4464///
4465/// ```json
4466///{
4467///  "description": "Sent from the client to the server, to read a specific resource URI.",
4468///  "type": "object",
4469///  "required": [
4470///    "method",
4471///    "params"
4472///  ],
4473///  "properties": {
4474///    "method": {
4475///      "type": "string",
4476///      "const": "resources/read"
4477///    },
4478///    "params": {
4479///      "type": "object",
4480///      "required": [
4481///        "uri"
4482///      ],
4483///      "properties": {
4484///        "uri": {
4485///          "description": "The URI of the resource to read. The URI can use any protocol; it is up to the server how to interpret it.",
4486///          "type": "string",
4487///          "format": "uri"
4488///        }
4489///      }
4490///    }
4491///  }
4492///}
4493/// ```
4494/// </details>
4495#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
4496pub struct ReadResourceRequest {
4497    pub method: ::std::string::String,
4498    pub params: ReadResourceRequestParams,
4499}
4500impl ::std::convert::From<&ReadResourceRequest> for ReadResourceRequest {
4501    fn from(value: &ReadResourceRequest) -> Self {
4502        value.clone()
4503    }
4504}
4505///ReadResourceRequestParams
4506///
4507/// <details><summary>JSON schema</summary>
4508///
4509/// ```json
4510///{
4511///  "type": "object",
4512///  "required": [
4513///    "uri"
4514///  ],
4515///  "properties": {
4516///    "uri": {
4517///      "description": "The URI of the resource to read. The URI can use any protocol; it is up to the server how to interpret it.",
4518///      "type": "string",
4519///      "format": "uri"
4520///    }
4521///  }
4522///}
4523/// ```
4524/// </details>
4525#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
4526pub struct ReadResourceRequestParams {
4527    ///The URI of the resource to read. The URI can use any protocol; it is up to the server how to interpret it.
4528    pub uri: ::std::string::String,
4529}
4530impl ::std::convert::From<&ReadResourceRequestParams> for ReadResourceRequestParams {
4531    fn from(value: &ReadResourceRequestParams) -> Self {
4532        value.clone()
4533    }
4534}
4535///The server's response to a resources/read request from the client.
4536///
4537/// <details><summary>JSON schema</summary>
4538///
4539/// ```json
4540///{
4541///  "description": "The server's response to a resources/read request from the client.",
4542///  "type": "object",
4543///  "required": [
4544///    "contents"
4545///  ],
4546///  "properties": {
4547///    "_meta": {
4548///      "description": "This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses.",
4549///      "type": "object",
4550///      "additionalProperties": {}
4551///    },
4552///    "contents": {
4553///      "type": "array",
4554///      "items": {
4555///        "anyOf": [
4556///          {
4557///            "$ref": "#/definitions/TextResourceContents"
4558///          },
4559///          {
4560///            "$ref": "#/definitions/BlobResourceContents"
4561///          }
4562///        ]
4563///      }
4564///    }
4565///  }
4566///}
4567/// ```
4568/// </details>
4569#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
4570pub struct ReadResourceResult {
4571    pub contents: ::std::vec::Vec<ReadResourceResultContentsItem>,
4572    ///This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses.
4573    #[serde(
4574        rename = "_meta",
4575        default,
4576        skip_serializing_if = "::serde_json::Map::is_empty"
4577    )]
4578    pub meta: ::serde_json::Map<::std::string::String, ::serde_json::Value>,
4579}
4580impl ::std::convert::From<&ReadResourceResult> for ReadResourceResult {
4581    fn from(value: &ReadResourceResult) -> Self {
4582        value.clone()
4583    }
4584}
4585///ReadResourceResultContentsItem
4586///
4587/// <details><summary>JSON schema</summary>
4588///
4589/// ```json
4590///{
4591///  "anyOf": [
4592///    {
4593///      "$ref": "#/definitions/TextResourceContents"
4594///    },
4595///    {
4596///      "$ref": "#/definitions/BlobResourceContents"
4597///    }
4598///  ]
4599///}
4600/// ```
4601/// </details>
4602#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
4603#[serde(untagged)]
4604pub enum ReadResourceResultContentsItem {
4605    TextResourceContents(TextResourceContents),
4606    BlobResourceContents(BlobResourceContents),
4607}
4608impl ::std::convert::From<&Self> for ReadResourceResultContentsItem {
4609    fn from(value: &ReadResourceResultContentsItem) -> Self {
4610        value.clone()
4611    }
4612}
4613impl ::std::convert::From<TextResourceContents> for ReadResourceResultContentsItem {
4614    fn from(value: TextResourceContents) -> Self {
4615        Self::TextResourceContents(value)
4616    }
4617}
4618impl ::std::convert::From<BlobResourceContents> for ReadResourceResultContentsItem {
4619    fn from(value: BlobResourceContents) -> Self {
4620        Self::BlobResourceContents(value)
4621    }
4622}
4623///Request
4624///
4625/// <details><summary>JSON schema</summary>
4626///
4627/// ```json
4628///{
4629///  "type": "object",
4630///  "required": [
4631///    "method"
4632///  ],
4633///  "properties": {
4634///    "method": {
4635///      "type": "string"
4636///    },
4637///    "params": {
4638///      "type": "object",
4639///      "properties": {
4640///        "_meta": {
4641///          "type": "object",
4642///          "properties": {
4643///            "progressToken": {
4644///              "description": "If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.",
4645///              "$ref": "#/definitions/ProgressToken"
4646///            }
4647///          }
4648///        }
4649///      },
4650///      "additionalProperties": {}
4651///    }
4652///  }
4653///}
4654/// ```
4655/// </details>
4656#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
4657pub struct Request {
4658    pub method: ::std::string::String,
4659    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4660    pub params: ::std::option::Option<RequestParams>,
4661}
4662impl ::std::convert::From<&Request> for Request {
4663    fn from(value: &Request) -> Self {
4664        value.clone()
4665    }
4666}
4667///RequestParams
4668///
4669/// <details><summary>JSON schema</summary>
4670///
4671/// ```json
4672///{
4673///  "type": "object",
4674///  "properties": {
4675///    "_meta": {
4676///      "type": "object",
4677///      "properties": {
4678///        "progressToken": {
4679///          "description": "If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.",
4680///          "$ref": "#/definitions/ProgressToken"
4681///        }
4682///      }
4683///    }
4684///  },
4685///  "additionalProperties": {}
4686///}
4687/// ```
4688/// </details>
4689#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
4690pub struct RequestParams {
4691    #[serde(
4692        rename = "_meta",
4693        default,
4694        skip_serializing_if = "::std::option::Option::is_none"
4695    )]
4696    pub meta: ::std::option::Option<RequestParamsMeta>,
4697}
4698impl ::std::convert::From<&RequestParams> for RequestParams {
4699    fn from(value: &RequestParams) -> Self {
4700        value.clone()
4701    }
4702}
4703impl ::std::default::Default for RequestParams {
4704    fn default() -> Self {
4705        Self {
4706            meta: Default::default(),
4707        }
4708    }
4709}
4710///RequestParamsMeta
4711///
4712/// <details><summary>JSON schema</summary>
4713///
4714/// ```json
4715///{
4716///  "type": "object",
4717///  "properties": {
4718///    "progressToken": {
4719///      "description": "If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.",
4720///      "$ref": "#/definitions/ProgressToken"
4721///    }
4722///  }
4723///}
4724/// ```
4725/// </details>
4726#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
4727pub struct RequestParamsMeta {
4728    ///If specified, the caller is requesting out-of-band progress notifications for this request (as represented by notifications/progress). The value of this parameter is an opaque token that will be attached to any subsequent notifications. The receiver is not obligated to provide these notifications.
4729    #[serde(
4730        rename = "progressToken",
4731        default,
4732        skip_serializing_if = "::std::option::Option::is_none"
4733    )]
4734    pub progress_token: ::std::option::Option<RequestId>,
4735}
4736impl ::std::convert::From<&RequestParamsMeta> for RequestParamsMeta {
4737    fn from(value: &RequestParamsMeta) -> Self {
4738        value.clone()
4739    }
4740}
4741impl ::std::default::Default for RequestParamsMeta {
4742    fn default() -> Self {
4743        Self {
4744            progress_token: Default::default(),
4745        }
4746    }
4747}
4748///A known resource that the server is capable of reading.
4749///
4750/// <details><summary>JSON schema</summary>
4751///
4752/// ```json
4753///{
4754///  "description": "A known resource that the server is capable of reading.",
4755///  "type": "object",
4756///  "required": [
4757///    "name",
4758///    "uri"
4759///  ],
4760///  "properties": {
4761///    "annotations": {
4762///      "type": "object",
4763///      "properties": {
4764///        "audience": {
4765///          "description": "Describes who the intended customer of this object or data is.\n\nIt can include multiple entries to indicate content useful for multiple audiences (e.g., `[\"user\", \"assistant\"]`).",
4766///          "type": "array",
4767///          "items": {
4768///            "$ref": "#/definitions/Role"
4769///          }
4770///        },
4771///        "priority": {
4772///          "description": "Describes how important this data is for operating the server.\n\nA value of 1 means \"most important,\" and indicates that the data is\neffectively required, while 0 means \"least important,\" and indicates that\nthe data is entirely optional.",
4773///          "type": "number",
4774///          "maximum": 1.0,
4775///          "minimum": 0.0
4776///        }
4777///      }
4778///    },
4779///    "description": {
4780///      "description": "A description of what this resource represents.\n\nThis can be used by clients to improve the LLM's understanding of available resources. It can be thought of like a \"hint\" to the model.",
4781///      "type": "string"
4782///    },
4783///    "mimeType": {
4784///      "description": "The MIME type of this resource, if known.",
4785///      "type": "string"
4786///    },
4787///    "name": {
4788///      "description": "A human-readable name for this resource.\n\nThis can be used by clients to populate UI elements.",
4789///      "type": "string"
4790///    },
4791///    "size": {
4792///      "description": "The size of the raw resource content, in bytes (i.e., before base64 encoding or any tokenization), if known.\n\nThis can be used by Hosts to display file sizes and estimate context window usage.",
4793///      "type": "integer"
4794///    },
4795///    "uri": {
4796///      "description": "The URI of this resource.",
4797///      "type": "string",
4798///      "format": "uri"
4799///    }
4800///  }
4801///}
4802/// ```
4803/// </details>
4804#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
4805pub struct Resource {
4806    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4807    pub annotations: ::std::option::Option<ResourceAnnotations>,
4808    ///A description of what this resource represents.
4809    ///
4810    ///This can be used by clients to improve the LLM's understanding of available resources. It can be thought of like a "hint" to the model.
4811    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4812    pub description: ::std::option::Option<::std::string::String>,
4813    ///The MIME type of this resource, if known.
4814    #[serde(
4815        rename = "mimeType",
4816        default,
4817        skip_serializing_if = "::std::option::Option::is_none"
4818    )]
4819    pub mime_type: ::std::option::Option<::std::string::String>,
4820    ///A human-readable name for this resource.
4821    ///
4822    ///This can be used by clients to populate UI elements.
4823    pub name: ::std::string::String,
4824    ///The size of the raw resource content, in bytes (i.e., before base64 encoding or any tokenization), if known.
4825    ///
4826    ///This can be used by Hosts to display file sizes and estimate context window usage.
4827    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4828    pub size: ::std::option::Option<i64>,
4829    ///The URI of this resource.
4830    pub uri: ::std::string::String,
4831}
4832impl ::std::convert::From<&Resource> for Resource {
4833    fn from(value: &Resource) -> Self {
4834        value.clone()
4835    }
4836}
4837///ResourceAnnotations
4838///
4839/// <details><summary>JSON schema</summary>
4840///
4841/// ```json
4842///{
4843///  "type": "object",
4844///  "properties": {
4845///    "audience": {
4846///      "description": "Describes who the intended customer of this object or data is.\n\nIt can include multiple entries to indicate content useful for multiple audiences (e.g., `[\"user\", \"assistant\"]`).",
4847///      "type": "array",
4848///      "items": {
4849///        "$ref": "#/definitions/Role"
4850///      }
4851///    },
4852///    "priority": {
4853///      "description": "Describes how important this data is for operating the server.\n\nA value of 1 means \"most important,\" and indicates that the data is\neffectively required, while 0 means \"least important,\" and indicates that\nthe data is entirely optional.",
4854///      "type": "number",
4855///      "maximum": 1.0,
4856///      "minimum": 0.0
4857///    }
4858///  }
4859///}
4860/// ```
4861/// </details>
4862#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
4863pub struct ResourceAnnotations {
4864    ///Describes who the intended customer of this object or data is.
4865    ///
4866    ///It can include multiple entries to indicate content useful for multiple audiences (e.g., `["user", "assistant"]`).
4867    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
4868    pub audience: ::std::vec::Vec<Role>,
4869    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4870    pub priority: ::std::option::Option<f64>,
4871}
4872impl ::std::convert::From<&ResourceAnnotations> for ResourceAnnotations {
4873    fn from(value: &ResourceAnnotations) -> Self {
4874        value.clone()
4875    }
4876}
4877impl ::std::default::Default for ResourceAnnotations {
4878    fn default() -> Self {
4879        Self {
4880            audience: Default::default(),
4881            priority: Default::default(),
4882        }
4883    }
4884}
4885///The contents of a specific resource or sub-resource.
4886///
4887/// <details><summary>JSON schema</summary>
4888///
4889/// ```json
4890///{
4891///  "description": "The contents of a specific resource or sub-resource.",
4892///  "type": "object",
4893///  "required": [
4894///    "uri"
4895///  ],
4896///  "properties": {
4897///    "mimeType": {
4898///      "description": "The MIME type of this resource, if known.",
4899///      "type": "string"
4900///    },
4901///    "uri": {
4902///      "description": "The URI of this resource.",
4903///      "type": "string",
4904///      "format": "uri"
4905///    }
4906///  }
4907///}
4908/// ```
4909/// </details>
4910#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
4911pub struct ResourceContents {
4912    ///The MIME type of this resource, if known.
4913    #[serde(
4914        rename = "mimeType",
4915        default,
4916        skip_serializing_if = "::std::option::Option::is_none"
4917    )]
4918    pub mime_type: ::std::option::Option<::std::string::String>,
4919    ///The URI of this resource.
4920    pub uri: ::std::string::String,
4921}
4922impl ::std::convert::From<&ResourceContents> for ResourceContents {
4923    fn from(value: &ResourceContents) -> Self {
4924        value.clone()
4925    }
4926}
4927///An optional notification from the server to the client, informing it that the list of resources it can read from has changed. This may be issued by servers without any previous subscription from the client.
4928///
4929/// <details><summary>JSON schema</summary>
4930///
4931/// ```json
4932///{
4933///  "description": "An optional notification from the server to the client, informing it that the list of resources it can read from has changed. This may be issued by servers without any previous subscription from the client.",
4934///  "type": "object",
4935///  "required": [
4936///    "method"
4937///  ],
4938///  "properties": {
4939///    "method": {
4940///      "type": "string",
4941///      "const": "notifications/resources/list_changed"
4942///    },
4943///    "params": {
4944///      "type": "object",
4945///      "properties": {
4946///        "_meta": {
4947///          "description": "This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications.",
4948///          "type": "object",
4949///          "additionalProperties": {}
4950///        }
4951///      },
4952///      "additionalProperties": {}
4953///    }
4954///  }
4955///}
4956/// ```
4957/// </details>
4958#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
4959pub struct ResourceListChangedNotification {
4960    pub method: ::std::string::String,
4961    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4962    pub params: ::std::option::Option<ResourceListChangedNotificationParams>,
4963}
4964impl ::std::convert::From<&ResourceListChangedNotification> for ResourceListChangedNotification {
4965    fn from(value: &ResourceListChangedNotification) -> Self {
4966        value.clone()
4967    }
4968}
4969///ResourceListChangedNotificationParams
4970///
4971/// <details><summary>JSON schema</summary>
4972///
4973/// ```json
4974///{
4975///  "type": "object",
4976///  "properties": {
4977///    "_meta": {
4978///      "description": "This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications.",
4979///      "type": "object",
4980///      "additionalProperties": {}
4981///    }
4982///  },
4983///  "additionalProperties": {}
4984///}
4985/// ```
4986/// </details>
4987#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
4988pub struct ResourceListChangedNotificationParams {
4989    ///This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications.
4990    #[serde(
4991        rename = "_meta",
4992        default,
4993        skip_serializing_if = "::serde_json::Map::is_empty"
4994    )]
4995    pub meta: ::serde_json::Map<::std::string::String, ::serde_json::Value>,
4996}
4997impl ::std::convert::From<&ResourceListChangedNotificationParams>
4998    for ResourceListChangedNotificationParams
4999{
5000    fn from(value: &ResourceListChangedNotificationParams) -> Self {
5001        value.clone()
5002    }
5003}
5004impl ::std::default::Default for ResourceListChangedNotificationParams {
5005    fn default() -> Self {
5006        Self {
5007            meta: Default::default(),
5008        }
5009    }
5010}
5011///A reference to a resource or resource template definition.
5012///
5013/// <details><summary>JSON schema</summary>
5014///
5015/// ```json
5016///{
5017///  "description": "A reference to a resource or resource template definition.",
5018///  "type": "object",
5019///  "required": [
5020///    "type",
5021///    "uri"
5022///  ],
5023///  "properties": {
5024///    "type": {
5025///      "type": "string",
5026///      "const": "ref/resource"
5027///    },
5028///    "uri": {
5029///      "description": "The URI or URI template of the resource.",
5030///      "type": "string",
5031///      "format": "uri-template"
5032///    }
5033///  }
5034///}
5035/// ```
5036/// </details>
5037#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
5038pub struct ResourceReference {
5039    #[serde(rename = "type")]
5040    pub type_: ::std::string::String,
5041    ///The URI or URI template of the resource.
5042    pub uri: ::std::string::String,
5043}
5044impl ::std::convert::From<&ResourceReference> for ResourceReference {
5045    fn from(value: &ResourceReference) -> Self {
5046        value.clone()
5047    }
5048}
5049///A template description for resources available on the server.
5050///
5051/// <details><summary>JSON schema</summary>
5052///
5053/// ```json
5054///{
5055///  "description": "A template description for resources available on the server.",
5056///  "type": "object",
5057///  "required": [
5058///    "name",
5059///    "uriTemplate"
5060///  ],
5061///  "properties": {
5062///    "annotations": {
5063///      "type": "object",
5064///      "properties": {
5065///        "audience": {
5066///          "description": "Describes who the intended customer of this object or data is.\n\nIt can include multiple entries to indicate content useful for multiple audiences (e.g., `[\"user\", \"assistant\"]`).",
5067///          "type": "array",
5068///          "items": {
5069///            "$ref": "#/definitions/Role"
5070///          }
5071///        },
5072///        "priority": {
5073///          "description": "Describes how important this data is for operating the server.\n\nA value of 1 means \"most important,\" and indicates that the data is\neffectively required, while 0 means \"least important,\" and indicates that\nthe data is entirely optional.",
5074///          "type": "number",
5075///          "maximum": 1.0,
5076///          "minimum": 0.0
5077///        }
5078///      }
5079///    },
5080///    "description": {
5081///      "description": "A description of what this template is for.\n\nThis can be used by clients to improve the LLM's understanding of available resources. It can be thought of like a \"hint\" to the model.",
5082///      "type": "string"
5083///    },
5084///    "mimeType": {
5085///      "description": "The MIME type for all resources that match this template. This should only be included if all resources matching this template have the same type.",
5086///      "type": "string"
5087///    },
5088///    "name": {
5089///      "description": "A human-readable name for the type of resource this template refers to.\n\nThis can be used by clients to populate UI elements.",
5090///      "type": "string"
5091///    },
5092///    "uriTemplate": {
5093///      "description": "A URI template (according to RFC 6570) that can be used to construct resource URIs.",
5094///      "type": "string",
5095///      "format": "uri-template"
5096///    }
5097///  }
5098///}
5099/// ```
5100/// </details>
5101#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
5102pub struct ResourceTemplate {
5103    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5104    pub annotations: ::std::option::Option<ResourceTemplateAnnotations>,
5105    ///A description of what this template is for.
5106    ///
5107    ///This can be used by clients to improve the LLM's understanding of available resources. It can be thought of like a "hint" to the model.
5108    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5109    pub description: ::std::option::Option<::std::string::String>,
5110    ///The MIME type for all resources that match this template. This should only be included if all resources matching this template have the same type.
5111    #[serde(
5112        rename = "mimeType",
5113        default,
5114        skip_serializing_if = "::std::option::Option::is_none"
5115    )]
5116    pub mime_type: ::std::option::Option<::std::string::String>,
5117    ///A human-readable name for the type of resource this template refers to.
5118    ///
5119    ///This can be used by clients to populate UI elements.
5120    pub name: ::std::string::String,
5121    ///A URI template (according to RFC 6570) that can be used to construct resource URIs.
5122    #[serde(rename = "uriTemplate")]
5123    pub uri_template: ::std::string::String,
5124}
5125impl ::std::convert::From<&ResourceTemplate> for ResourceTemplate {
5126    fn from(value: &ResourceTemplate) -> Self {
5127        value.clone()
5128    }
5129}
5130///ResourceTemplateAnnotations
5131///
5132/// <details><summary>JSON schema</summary>
5133///
5134/// ```json
5135///{
5136///  "type": "object",
5137///  "properties": {
5138///    "audience": {
5139///      "description": "Describes who the intended customer of this object or data is.\n\nIt can include multiple entries to indicate content useful for multiple audiences (e.g., `[\"user\", \"assistant\"]`).",
5140///      "type": "array",
5141///      "items": {
5142///        "$ref": "#/definitions/Role"
5143///      }
5144///    },
5145///    "priority": {
5146///      "description": "Describes how important this data is for operating the server.\n\nA value of 1 means \"most important,\" and indicates that the data is\neffectively required, while 0 means \"least important,\" and indicates that\nthe data is entirely optional.",
5147///      "type": "number",
5148///      "maximum": 1.0,
5149///      "minimum": 0.0
5150///    }
5151///  }
5152///}
5153/// ```
5154/// </details>
5155#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
5156pub struct ResourceTemplateAnnotations {
5157    ///Describes who the intended customer of this object or data is.
5158    ///
5159    ///It can include multiple entries to indicate content useful for multiple audiences (e.g., `["user", "assistant"]`).
5160    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
5161    pub audience: ::std::vec::Vec<Role>,
5162    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5163    pub priority: ::std::option::Option<f64>,
5164}
5165impl ::std::convert::From<&ResourceTemplateAnnotations> for ResourceTemplateAnnotations {
5166    fn from(value: &ResourceTemplateAnnotations) -> Self {
5167        value.clone()
5168    }
5169}
5170impl ::std::default::Default for ResourceTemplateAnnotations {
5171    fn default() -> Self {
5172        Self {
5173            audience: Default::default(),
5174            priority: Default::default(),
5175        }
5176    }
5177}
5178///A notification from the server to the client, informing it that a resource has changed and may need to be read again. This should only be sent if the client previously sent a resources/subscribe request.
5179///
5180/// <details><summary>JSON schema</summary>
5181///
5182/// ```json
5183///{
5184///  "description": "A notification from the server to the client, informing it that a resource has changed and may need to be read again. This should only be sent if the client previously sent a resources/subscribe request.",
5185///  "type": "object",
5186///  "required": [
5187///    "method",
5188///    "params"
5189///  ],
5190///  "properties": {
5191///    "method": {
5192///      "type": "string",
5193///      "const": "notifications/resources/updated"
5194///    },
5195///    "params": {
5196///      "type": "object",
5197///      "required": [
5198///        "uri"
5199///      ],
5200///      "properties": {
5201///        "uri": {
5202///          "description": "The URI of the resource that has been updated. This might be a sub-resource of the one that the client actually subscribed to.",
5203///          "type": "string",
5204///          "format": "uri"
5205///        }
5206///      }
5207///    }
5208///  }
5209///}
5210/// ```
5211/// </details>
5212#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
5213pub struct ResourceUpdatedNotification {
5214    pub method: ::std::string::String,
5215    pub params: ResourceUpdatedNotificationParams,
5216}
5217impl ::std::convert::From<&ResourceUpdatedNotification> for ResourceUpdatedNotification {
5218    fn from(value: &ResourceUpdatedNotification) -> Self {
5219        value.clone()
5220    }
5221}
5222///ResourceUpdatedNotificationParams
5223///
5224/// <details><summary>JSON schema</summary>
5225///
5226/// ```json
5227///{
5228///  "type": "object",
5229///  "required": [
5230///    "uri"
5231///  ],
5232///  "properties": {
5233///    "uri": {
5234///      "description": "The URI of the resource that has been updated. This might be a sub-resource of the one that the client actually subscribed to.",
5235///      "type": "string",
5236///      "format": "uri"
5237///    }
5238///  }
5239///}
5240/// ```
5241/// </details>
5242#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
5243pub struct ResourceUpdatedNotificationParams {
5244    ///The URI of the resource that has been updated. This might be a sub-resource of the one that the client actually subscribed to.
5245    pub uri: ::std::string::String,
5246}
5247impl ::std::convert::From<&ResourceUpdatedNotificationParams>
5248    for ResourceUpdatedNotificationParams
5249{
5250    fn from(value: &ResourceUpdatedNotificationParams) -> Self {
5251        value.clone()
5252    }
5253}
5254///Result
5255///
5256/// <details><summary>JSON schema</summary>
5257///
5258/// ```json
5259///{
5260///  "type": "object",
5261///  "properties": {
5262///    "_meta": {
5263///      "description": "This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses.",
5264///      "type": "object",
5265///      "additionalProperties": {}
5266///    }
5267///  },
5268///  "additionalProperties": {}
5269///}
5270/// ```
5271/// </details>
5272#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
5273pub struct Result {
5274    ///This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses.
5275    #[serde(
5276        rename = "_meta",
5277        default,
5278        skip_serializing_if = "::serde_json::Map::is_empty"
5279    )]
5280    pub meta: ::serde_json::Map<::std::string::String, ::serde_json::Value>,
5281}
5282impl ::std::convert::From<&Result> for Result {
5283    fn from(value: &Result) -> Self {
5284        value.clone()
5285    }
5286}
5287impl ::std::default::Default for Result {
5288    fn default() -> Self {
5289        Self {
5290            meta: Default::default(),
5291        }
5292    }
5293}
5294///The sender or recipient of messages and data in a conversation.
5295///
5296/// <details><summary>JSON schema</summary>
5297///
5298/// ```json
5299///{
5300///  "description": "The sender or recipient of messages and data in a conversation.",
5301///  "type": "string",
5302///  "enum": [
5303///    "assistant",
5304///    "user"
5305///  ]
5306///}
5307/// ```
5308/// </details>
5309#[derive(
5310    :: serde :: Deserialize,
5311    :: serde :: Serialize,
5312    Clone,
5313    Copy,
5314    Debug,
5315    Eq,
5316    Hash,
5317    Ord,
5318    PartialEq,
5319    PartialOrd,
5320)]
5321pub enum Role {
5322    #[serde(rename = "assistant")]
5323    Assistant,
5324    #[serde(rename = "user")]
5325    User,
5326}
5327impl ::std::convert::From<&Self> for Role {
5328    fn from(value: &Role) -> Self {
5329        value.clone()
5330    }
5331}
5332impl ::std::fmt::Display for Role {
5333    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5334        match *self {
5335            Self::Assistant => write!(f, "assistant"),
5336            Self::User => write!(f, "user"),
5337        }
5338    }
5339}
5340impl ::std::str::FromStr for Role {
5341    type Err = self::error::ConversionError;
5342    fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5343        match value {
5344            "assistant" => Ok(Self::Assistant),
5345            "user" => Ok(Self::User),
5346            _ => Err("invalid value".into()),
5347        }
5348    }
5349}
5350impl ::std::convert::TryFrom<&str> for Role {
5351    type Error = self::error::ConversionError;
5352    fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5353        value.parse()
5354    }
5355}
5356impl ::std::convert::TryFrom<&::std::string::String> for Role {
5357    type Error = self::error::ConversionError;
5358    fn try_from(
5359        value: &::std::string::String,
5360    ) -> ::std::result::Result<Self, self::error::ConversionError> {
5361        value.parse()
5362    }
5363}
5364impl ::std::convert::TryFrom<::std::string::String> for Role {
5365    type Error = self::error::ConversionError;
5366    fn try_from(
5367        value: ::std::string::String,
5368    ) -> ::std::result::Result<Self, self::error::ConversionError> {
5369        value.parse()
5370    }
5371}
5372///Represents a root directory or file that the server can operate on.
5373///
5374/// <details><summary>JSON schema</summary>
5375///
5376/// ```json
5377///{
5378///  "description": "Represents a root directory or file that the server can operate on.",
5379///  "type": "object",
5380///  "required": [
5381///    "uri"
5382///  ],
5383///  "properties": {
5384///    "name": {
5385///      "description": "An optional name for the root. This can be used to provide a human-readable\nidentifier for the root, which may be useful for display purposes or for\nreferencing the root in other parts of the application.",
5386///      "type": "string"
5387///    },
5388///    "uri": {
5389///      "description": "The URI identifying the root. This *must* start with file:// for now.\nThis restriction may be relaxed in future versions of the protocol to allow\nother URI schemes.",
5390///      "type": "string",
5391///      "format": "uri"
5392///    }
5393///  }
5394///}
5395/// ```
5396/// </details>
5397#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
5398pub struct Root {
5399    ///An optional name for the root. This can be used to provide a human-readable
5400    ///identifier for the root, which may be useful for display purposes or for
5401    ///referencing the root in other parts of the application.
5402    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5403    pub name: ::std::option::Option<::std::string::String>,
5404    ///The URI identifying the root. This *must* start with file:// for now.
5405    ///This restriction may be relaxed in future versions of the protocol to allow
5406    ///other URI schemes.
5407    pub uri: ::std::string::String,
5408}
5409impl ::std::convert::From<&Root> for Root {
5410    fn from(value: &Root) -> Self {
5411        value.clone()
5412    }
5413}
5414///A notification from the client to the server, informing it that the list of roots has changed.
5415///This notification should be sent whenever the client adds, removes, or modifies any root.
5416///The server should then request an updated list of roots using the ListRootsRequest.
5417///
5418/// <details><summary>JSON schema</summary>
5419///
5420/// ```json
5421///{
5422///  "description": "A notification from the client to the server, informing it that the list of roots has changed.\nThis notification should be sent whenever the client adds, removes, or modifies any root.\nThe server should then request an updated list of roots using the ListRootsRequest.",
5423///  "type": "object",
5424///  "required": [
5425///    "method"
5426///  ],
5427///  "properties": {
5428///    "method": {
5429///      "type": "string",
5430///      "const": "notifications/roots/list_changed"
5431///    },
5432///    "params": {
5433///      "type": "object",
5434///      "properties": {
5435///        "_meta": {
5436///          "description": "This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications.",
5437///          "type": "object",
5438///          "additionalProperties": {}
5439///        }
5440///      },
5441///      "additionalProperties": {}
5442///    }
5443///  }
5444///}
5445/// ```
5446/// </details>
5447#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
5448pub struct RootsListChangedNotification {
5449    pub method: ::std::string::String,
5450    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5451    pub params: ::std::option::Option<RootsListChangedNotificationParams>,
5452}
5453impl ::std::convert::From<&RootsListChangedNotification> for RootsListChangedNotification {
5454    fn from(value: &RootsListChangedNotification) -> Self {
5455        value.clone()
5456    }
5457}
5458///RootsListChangedNotificationParams
5459///
5460/// <details><summary>JSON schema</summary>
5461///
5462/// ```json
5463///{
5464///  "type": "object",
5465///  "properties": {
5466///    "_meta": {
5467///      "description": "This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications.",
5468///      "type": "object",
5469///      "additionalProperties": {}
5470///    }
5471///  },
5472///  "additionalProperties": {}
5473///}
5474/// ```
5475/// </details>
5476#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
5477pub struct RootsListChangedNotificationParams {
5478    ///This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications.
5479    #[serde(
5480        rename = "_meta",
5481        default,
5482        skip_serializing_if = "::serde_json::Map::is_empty"
5483    )]
5484    pub meta: ::serde_json::Map<::std::string::String, ::serde_json::Value>,
5485}
5486impl ::std::convert::From<&RootsListChangedNotificationParams>
5487    for RootsListChangedNotificationParams
5488{
5489    fn from(value: &RootsListChangedNotificationParams) -> Self {
5490        value.clone()
5491    }
5492}
5493impl ::std::default::Default for RootsListChangedNotificationParams {
5494    fn default() -> Self {
5495        Self {
5496            meta: Default::default(),
5497        }
5498    }
5499}
5500///Describes a message issued to or received from an LLM API.
5501///
5502/// <details><summary>JSON schema</summary>
5503///
5504/// ```json
5505///{
5506///  "description": "Describes a message issued to or received from an LLM API.",
5507///  "type": "object",
5508///  "required": [
5509///    "content",
5510///    "role"
5511///  ],
5512///  "properties": {
5513///    "content": {
5514///      "anyOf": [
5515///        {
5516///          "$ref": "#/definitions/TextContent"
5517///        },
5518///        {
5519///          "$ref": "#/definitions/ImageContent"
5520///        }
5521///      ]
5522///    },
5523///    "role": {
5524///      "$ref": "#/definitions/Role"
5525///    }
5526///  }
5527///}
5528/// ```
5529/// </details>
5530#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
5531pub struct SamplingMessage {
5532    pub content: SamplingMessageContent,
5533    pub role: Role,
5534}
5535impl ::std::convert::From<&SamplingMessage> for SamplingMessage {
5536    fn from(value: &SamplingMessage) -> Self {
5537        value.clone()
5538    }
5539}
5540///SamplingMessageContent
5541///
5542/// <details><summary>JSON schema</summary>
5543///
5544/// ```json
5545///{
5546///  "anyOf": [
5547///    {
5548///      "$ref": "#/definitions/TextContent"
5549///    },
5550///    {
5551///      "$ref": "#/definitions/ImageContent"
5552///    }
5553///  ]
5554///}
5555/// ```
5556/// </details>
5557#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
5558#[serde(untagged)]
5559pub enum SamplingMessageContent {
5560    TextContent(TextContent),
5561    ImageContent(ImageContent),
5562}
5563impl ::std::convert::From<&Self> for SamplingMessageContent {
5564    fn from(value: &SamplingMessageContent) -> Self {
5565        value.clone()
5566    }
5567}
5568impl ::std::convert::From<TextContent> for SamplingMessageContent {
5569    fn from(value: TextContent) -> Self {
5570        Self::TextContent(value)
5571    }
5572}
5573impl ::std::convert::From<ImageContent> for SamplingMessageContent {
5574    fn from(value: ImageContent) -> Self {
5575        Self::ImageContent(value)
5576    }
5577}
5578///Capabilities that a server may support. Known capabilities are defined here, in this schema, but this is not a closed set: any server can define its own, additional capabilities.
5579///
5580/// <details><summary>JSON schema</summary>
5581///
5582/// ```json
5583///{
5584///  "description": "Capabilities that a server may support. Known capabilities are defined here, in this schema, but this is not a closed set: any server can define its own, additional capabilities.",
5585///  "type": "object",
5586///  "properties": {
5587///    "experimental": {
5588///      "description": "Experimental, non-standard capabilities that the server supports.",
5589///      "type": "object",
5590///      "additionalProperties": {
5591///        "type": "object",
5592///        "additionalProperties": true
5593///      }
5594///    },
5595///    "logging": {
5596///      "description": "Present if the server supports sending log messages to the client.",
5597///      "type": "object",
5598///      "additionalProperties": true
5599///    },
5600///    "prompts": {
5601///      "description": "Present if the server offers any prompt templates.",
5602///      "type": "object",
5603///      "properties": {
5604///        "listChanged": {
5605///          "description": "Whether this server supports notifications for changes to the prompt list.",
5606///          "type": "boolean"
5607///        }
5608///      }
5609///    },
5610///    "resources": {
5611///      "description": "Present if the server offers any resources to read.",
5612///      "type": "object",
5613///      "properties": {
5614///        "listChanged": {
5615///          "description": "Whether this server supports notifications for changes to the resource list.",
5616///          "type": "boolean"
5617///        },
5618///        "subscribe": {
5619///          "description": "Whether this server supports subscribing to resource updates.",
5620///          "type": "boolean"
5621///        }
5622///      }
5623///    },
5624///    "tools": {
5625///      "description": "Present if the server offers any tools to call.",
5626///      "type": "object",
5627///      "properties": {
5628///        "listChanged": {
5629///          "description": "Whether this server supports notifications for changes to the tool list.",
5630///          "type": "boolean"
5631///        }
5632///      }
5633///    }
5634///  }
5635///}
5636/// ```
5637/// </details>
5638#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
5639pub struct ServerCapabilities {
5640    ///Experimental, non-standard capabilities that the server supports.
5641    #[serde(
5642        default,
5643        skip_serializing_if = ":: std :: collections :: BTreeMap::is_empty"
5644    )]
5645    pub experimental: ::std::collections::BTreeMap<
5646        ::std::string::String,
5647        ::serde_json::Map<::std::string::String, ::serde_json::Value>,
5648    >,
5649    ///Present if the server supports sending log messages to the client.
5650    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5651    pub logging:
5652        ::std::option::Option<::serde_json::Map<::std::string::String, ::serde_json::Value>>,
5653    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5654    pub prompts: ::std::option::Option<ServerCapabilitiesPrompts>,
5655    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5656    pub resources: ::std::option::Option<ServerCapabilitiesResources>,
5657    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5658    pub tools: ::std::option::Option<ServerCapabilitiesTools>,
5659}
5660impl ::std::convert::From<&ServerCapabilities> for ServerCapabilities {
5661    fn from(value: &ServerCapabilities) -> Self {
5662        value.clone()
5663    }
5664}
5665impl ::std::default::Default for ServerCapabilities {
5666    fn default() -> Self {
5667        Self {
5668            experimental: Default::default(),
5669            logging: Default::default(),
5670            prompts: Default::default(),
5671            resources: Default::default(),
5672            tools: Default::default(),
5673        }
5674    }
5675}
5676///Present if the server offers any prompt templates.
5677///
5678/// <details><summary>JSON schema</summary>
5679///
5680/// ```json
5681///{
5682///  "description": "Present if the server offers any prompt templates.",
5683///  "type": "object",
5684///  "properties": {
5685///    "listChanged": {
5686///      "description": "Whether this server supports notifications for changes to the prompt list.",
5687///      "type": "boolean"
5688///    }
5689///  }
5690///}
5691/// ```
5692/// </details>
5693#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
5694pub struct ServerCapabilitiesPrompts {
5695    ///Whether this server supports notifications for changes to the prompt list.
5696    #[serde(
5697        rename = "listChanged",
5698        default,
5699        skip_serializing_if = "::std::option::Option::is_none"
5700    )]
5701    pub list_changed: ::std::option::Option<bool>,
5702}
5703impl ::std::convert::From<&ServerCapabilitiesPrompts> for ServerCapabilitiesPrompts {
5704    fn from(value: &ServerCapabilitiesPrompts) -> Self {
5705        value.clone()
5706    }
5707}
5708impl ::std::default::Default for ServerCapabilitiesPrompts {
5709    fn default() -> Self {
5710        Self {
5711            list_changed: Default::default(),
5712        }
5713    }
5714}
5715///Present if the server offers any resources to read.
5716///
5717/// <details><summary>JSON schema</summary>
5718///
5719/// ```json
5720///{
5721///  "description": "Present if the server offers any resources to read.",
5722///  "type": "object",
5723///  "properties": {
5724///    "listChanged": {
5725///      "description": "Whether this server supports notifications for changes to the resource list.",
5726///      "type": "boolean"
5727///    },
5728///    "subscribe": {
5729///      "description": "Whether this server supports subscribing to resource updates.",
5730///      "type": "boolean"
5731///    }
5732///  }
5733///}
5734/// ```
5735/// </details>
5736#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
5737pub struct ServerCapabilitiesResources {
5738    ///Whether this server supports notifications for changes to the resource list.
5739    #[serde(
5740        rename = "listChanged",
5741        default,
5742        skip_serializing_if = "::std::option::Option::is_none"
5743    )]
5744    pub list_changed: ::std::option::Option<bool>,
5745    ///Whether this server supports subscribing to resource updates.
5746    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5747    pub subscribe: ::std::option::Option<bool>,
5748}
5749impl ::std::convert::From<&ServerCapabilitiesResources> for ServerCapabilitiesResources {
5750    fn from(value: &ServerCapabilitiesResources) -> Self {
5751        value.clone()
5752    }
5753}
5754impl ::std::default::Default for ServerCapabilitiesResources {
5755    fn default() -> Self {
5756        Self {
5757            list_changed: Default::default(),
5758            subscribe: Default::default(),
5759        }
5760    }
5761}
5762///Present if the server offers any tools to call.
5763///
5764/// <details><summary>JSON schema</summary>
5765///
5766/// ```json
5767///{
5768///  "description": "Present if the server offers any tools to call.",
5769///  "type": "object",
5770///  "properties": {
5771///    "listChanged": {
5772///      "description": "Whether this server supports notifications for changes to the tool list.",
5773///      "type": "boolean"
5774///    }
5775///  }
5776///}
5777/// ```
5778/// </details>
5779#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
5780pub struct ServerCapabilitiesTools {
5781    ///Whether this server supports notifications for changes to the tool list.
5782    #[serde(
5783        rename = "listChanged",
5784        default,
5785        skip_serializing_if = "::std::option::Option::is_none"
5786    )]
5787    pub list_changed: ::std::option::Option<bool>,
5788}
5789impl ::std::convert::From<&ServerCapabilitiesTools> for ServerCapabilitiesTools {
5790    fn from(value: &ServerCapabilitiesTools) -> Self {
5791        value.clone()
5792    }
5793}
5794impl ::std::default::Default for ServerCapabilitiesTools {
5795    fn default() -> Self {
5796        Self {
5797            list_changed: Default::default(),
5798        }
5799    }
5800}
5801///ServerNotification
5802///
5803/// <details><summary>JSON schema</summary>
5804///
5805/// ```json
5806///{
5807///  "anyOf": [
5808///    {
5809///      "$ref": "#/definitions/CancelledNotification"
5810///    },
5811///    {
5812///      "$ref": "#/definitions/ProgressNotification"
5813///    },
5814///    {
5815///      "$ref": "#/definitions/ResourceListChangedNotification"
5816///    },
5817///    {
5818///      "$ref": "#/definitions/ResourceUpdatedNotification"
5819///    },
5820///    {
5821///      "$ref": "#/definitions/PromptListChangedNotification"
5822///    },
5823///    {
5824///      "$ref": "#/definitions/ToolListChangedNotification"
5825///    },
5826///    {
5827///      "$ref": "#/definitions/LoggingMessageNotification"
5828///    }
5829///  ]
5830///}
5831/// ```
5832/// </details>
5833#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
5834#[serde(untagged)]
5835pub enum ServerNotification {
5836    CancelledNotification(CancelledNotification),
5837    ProgressNotification(ProgressNotification),
5838    ResourceListChangedNotification(ResourceListChangedNotification),
5839    ResourceUpdatedNotification(ResourceUpdatedNotification),
5840    PromptListChangedNotification(PromptListChangedNotification),
5841    ToolListChangedNotification(ToolListChangedNotification),
5842    LoggingMessageNotification(LoggingMessageNotification),
5843}
5844impl ::std::convert::From<&Self> for ServerNotification {
5845    fn from(value: &ServerNotification) -> Self {
5846        value.clone()
5847    }
5848}
5849impl ::std::convert::From<CancelledNotification> for ServerNotification {
5850    fn from(value: CancelledNotification) -> Self {
5851        Self::CancelledNotification(value)
5852    }
5853}
5854impl ::std::convert::From<ProgressNotification> for ServerNotification {
5855    fn from(value: ProgressNotification) -> Self {
5856        Self::ProgressNotification(value)
5857    }
5858}
5859impl ::std::convert::From<ResourceListChangedNotification> for ServerNotification {
5860    fn from(value: ResourceListChangedNotification) -> Self {
5861        Self::ResourceListChangedNotification(value)
5862    }
5863}
5864impl ::std::convert::From<ResourceUpdatedNotification> for ServerNotification {
5865    fn from(value: ResourceUpdatedNotification) -> Self {
5866        Self::ResourceUpdatedNotification(value)
5867    }
5868}
5869impl ::std::convert::From<PromptListChangedNotification> for ServerNotification {
5870    fn from(value: PromptListChangedNotification) -> Self {
5871        Self::PromptListChangedNotification(value)
5872    }
5873}
5874impl ::std::convert::From<ToolListChangedNotification> for ServerNotification {
5875    fn from(value: ToolListChangedNotification) -> Self {
5876        Self::ToolListChangedNotification(value)
5877    }
5878}
5879impl ::std::convert::From<LoggingMessageNotification> for ServerNotification {
5880    fn from(value: LoggingMessageNotification) -> Self {
5881        Self::LoggingMessageNotification(value)
5882    }
5883}
5884///ServerRequest
5885///
5886/// <details><summary>JSON schema</summary>
5887///
5888/// ```json
5889///{
5890///  "anyOf": [
5891///    {
5892///      "$ref": "#/definitions/PingRequest"
5893///    },
5894///    {
5895///      "$ref": "#/definitions/CreateMessageRequest"
5896///    },
5897///    {
5898///      "$ref": "#/definitions/ListRootsRequest"
5899///    }
5900///  ]
5901///}
5902/// ```
5903/// </details>
5904#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
5905#[serde(untagged)]
5906pub enum ServerRequest {
5907    PingRequest(PingRequest),
5908    CreateMessageRequest(CreateMessageRequest),
5909    ListRootsRequest(ListRootsRequest),
5910}
5911impl ::std::convert::From<&Self> for ServerRequest {
5912    fn from(value: &ServerRequest) -> Self {
5913        value.clone()
5914    }
5915}
5916impl ::std::convert::From<PingRequest> for ServerRequest {
5917    fn from(value: PingRequest) -> Self {
5918        Self::PingRequest(value)
5919    }
5920}
5921impl ::std::convert::From<CreateMessageRequest> for ServerRequest {
5922    fn from(value: CreateMessageRequest) -> Self {
5923        Self::CreateMessageRequest(value)
5924    }
5925}
5926impl ::std::convert::From<ListRootsRequest> for ServerRequest {
5927    fn from(value: ListRootsRequest) -> Self {
5928        Self::ListRootsRequest(value)
5929    }
5930}
5931///ServerResult
5932///
5933/// <details><summary>JSON schema</summary>
5934///
5935/// ```json
5936///{
5937///  "anyOf": [
5938///    {
5939///      "$ref": "#/definitions/Result"
5940///    },
5941///    {
5942///      "$ref": "#/definitions/InitializeResult"
5943///    },
5944///    {
5945///      "$ref": "#/definitions/ListResourcesResult"
5946///    },
5947///    {
5948///      "$ref": "#/definitions/ListResourceTemplatesResult"
5949///    },
5950///    {
5951///      "$ref": "#/definitions/ReadResourceResult"
5952///    },
5953///    {
5954///      "$ref": "#/definitions/ListPromptsResult"
5955///    },
5956///    {
5957///      "$ref": "#/definitions/GetPromptResult"
5958///    },
5959///    {
5960///      "$ref": "#/definitions/ListToolsResult"
5961///    },
5962///    {
5963///      "$ref": "#/definitions/CallToolResult"
5964///    },
5965///    {
5966///      "$ref": "#/definitions/CompleteResult"
5967///    }
5968///  ]
5969///}
5970/// ```
5971/// </details>
5972#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
5973#[serde(untagged)]
5974pub enum ServerResult {
5975    Result(Result),
5976    InitializeResult(InitializeResult),
5977    ListResourcesResult(ListResourcesResult),
5978    ListResourceTemplatesResult(ListResourceTemplatesResult),
5979    ReadResourceResult(ReadResourceResult),
5980    ListPromptsResult(ListPromptsResult),
5981    GetPromptResult(GetPromptResult),
5982    ListToolsResult(ListToolsResult),
5983    CallToolResult(CallToolResult),
5984    CompleteResult(CompleteResult),
5985}
5986impl ::std::convert::From<&Self> for ServerResult {
5987    fn from(value: &ServerResult) -> Self {
5988        value.clone()
5989    }
5990}
5991impl ::std::convert::From<Result> for ServerResult {
5992    fn from(value: Result) -> Self {
5993        Self::Result(value)
5994    }
5995}
5996impl ::std::convert::From<InitializeResult> for ServerResult {
5997    fn from(value: InitializeResult) -> Self {
5998        Self::InitializeResult(value)
5999    }
6000}
6001impl ::std::convert::From<ListResourcesResult> for ServerResult {
6002    fn from(value: ListResourcesResult) -> Self {
6003        Self::ListResourcesResult(value)
6004    }
6005}
6006impl ::std::convert::From<ListResourceTemplatesResult> for ServerResult {
6007    fn from(value: ListResourceTemplatesResult) -> Self {
6008        Self::ListResourceTemplatesResult(value)
6009    }
6010}
6011impl ::std::convert::From<ReadResourceResult> for ServerResult {
6012    fn from(value: ReadResourceResult) -> Self {
6013        Self::ReadResourceResult(value)
6014    }
6015}
6016impl ::std::convert::From<ListPromptsResult> for ServerResult {
6017    fn from(value: ListPromptsResult) -> Self {
6018        Self::ListPromptsResult(value)
6019    }
6020}
6021impl ::std::convert::From<GetPromptResult> for ServerResult {
6022    fn from(value: GetPromptResult) -> Self {
6023        Self::GetPromptResult(value)
6024    }
6025}
6026impl ::std::convert::From<ListToolsResult> for ServerResult {
6027    fn from(value: ListToolsResult) -> Self {
6028        Self::ListToolsResult(value)
6029    }
6030}
6031impl ::std::convert::From<CallToolResult> for ServerResult {
6032    fn from(value: CallToolResult) -> Self {
6033        Self::CallToolResult(value)
6034    }
6035}
6036impl ::std::convert::From<CompleteResult> for ServerResult {
6037    fn from(value: CompleteResult) -> Self {
6038        Self::CompleteResult(value)
6039    }
6040}
6041///A request from the client to the server, to enable or adjust logging.
6042///
6043/// <details><summary>JSON schema</summary>
6044///
6045/// ```json
6046///{
6047///  "description": "A request from the client to the server, to enable or adjust logging.",
6048///  "type": "object",
6049///  "required": [
6050///    "method",
6051///    "params"
6052///  ],
6053///  "properties": {
6054///    "method": {
6055///      "type": "string",
6056///      "const": "logging/setLevel"
6057///    },
6058///    "params": {
6059///      "type": "object",
6060///      "required": [
6061///        "level"
6062///      ],
6063///      "properties": {
6064///        "level": {
6065///          "description": "The level of logging that the client wants to receive from the server. The server should send all logs at this level and higher (i.e., more severe) to the client as notifications/message.",
6066///          "$ref": "#/definitions/LoggingLevel"
6067///        }
6068///      }
6069///    }
6070///  }
6071///}
6072/// ```
6073/// </details>
6074#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
6075pub struct SetLevelRequest {
6076    pub method: ::std::string::String,
6077    pub params: SetLevelRequestParams,
6078}
6079impl ::std::convert::From<&SetLevelRequest> for SetLevelRequest {
6080    fn from(value: &SetLevelRequest) -> Self {
6081        value.clone()
6082    }
6083}
6084///SetLevelRequestParams
6085///
6086/// <details><summary>JSON schema</summary>
6087///
6088/// ```json
6089///{
6090///  "type": "object",
6091///  "required": [
6092///    "level"
6093///  ],
6094///  "properties": {
6095///    "level": {
6096///      "description": "The level of logging that the client wants to receive from the server. The server should send all logs at this level and higher (i.e., more severe) to the client as notifications/message.",
6097///      "$ref": "#/definitions/LoggingLevel"
6098///    }
6099///  }
6100///}
6101/// ```
6102/// </details>
6103#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
6104pub struct SetLevelRequestParams {
6105    ///The level of logging that the client wants to receive from the server. The server should send all logs at this level and higher (i.e., more severe) to the client as notifications/message.
6106    pub level: LoggingLevel,
6107}
6108impl ::std::convert::From<&SetLevelRequestParams> for SetLevelRequestParams {
6109    fn from(value: &SetLevelRequestParams) -> Self {
6110        value.clone()
6111    }
6112}
6113///Sent from the client to request resources/updated notifications from the server whenever a particular resource changes.
6114///
6115/// <details><summary>JSON schema</summary>
6116///
6117/// ```json
6118///{
6119///  "description": "Sent from the client to request resources/updated notifications from the server whenever a particular resource changes.",
6120///  "type": "object",
6121///  "required": [
6122///    "method",
6123///    "params"
6124///  ],
6125///  "properties": {
6126///    "method": {
6127///      "type": "string",
6128///      "const": "resources/subscribe"
6129///    },
6130///    "params": {
6131///      "type": "object",
6132///      "required": [
6133///        "uri"
6134///      ],
6135///      "properties": {
6136///        "uri": {
6137///          "description": "The URI of the resource to subscribe to. The URI can use any protocol; it is up to the server how to interpret it.",
6138///          "type": "string",
6139///          "format": "uri"
6140///        }
6141///      }
6142///    }
6143///  }
6144///}
6145/// ```
6146/// </details>
6147#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
6148pub struct SubscribeRequest {
6149    pub method: ::std::string::String,
6150    pub params: SubscribeRequestParams,
6151}
6152impl ::std::convert::From<&SubscribeRequest> for SubscribeRequest {
6153    fn from(value: &SubscribeRequest) -> Self {
6154        value.clone()
6155    }
6156}
6157///SubscribeRequestParams
6158///
6159/// <details><summary>JSON schema</summary>
6160///
6161/// ```json
6162///{
6163///  "type": "object",
6164///  "required": [
6165///    "uri"
6166///  ],
6167///  "properties": {
6168///    "uri": {
6169///      "description": "The URI of the resource to subscribe to. The URI can use any protocol; it is up to the server how to interpret it.",
6170///      "type": "string",
6171///      "format": "uri"
6172///    }
6173///  }
6174///}
6175/// ```
6176/// </details>
6177#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
6178pub struct SubscribeRequestParams {
6179    ///The URI of the resource to subscribe to. The URI can use any protocol; it is up to the server how to interpret it.
6180    pub uri: ::std::string::String,
6181}
6182impl ::std::convert::From<&SubscribeRequestParams> for SubscribeRequestParams {
6183    fn from(value: &SubscribeRequestParams) -> Self {
6184        value.clone()
6185    }
6186}
6187///Text provided to or from an LLM.
6188///
6189/// <details><summary>JSON schema</summary>
6190///
6191/// ```json
6192///{
6193///  "description": "Text provided to or from an LLM.",
6194///  "type": "object",
6195///  "required": [
6196///    "text",
6197///    "type"
6198///  ],
6199///  "properties": {
6200///    "annotations": {
6201///      "type": "object",
6202///      "properties": {
6203///        "audience": {
6204///          "description": "Describes who the intended customer of this object or data is.\n\nIt can include multiple entries to indicate content useful for multiple audiences (e.g., `[\"user\", \"assistant\"]`).",
6205///          "type": "array",
6206///          "items": {
6207///            "$ref": "#/definitions/Role"
6208///          }
6209///        },
6210///        "priority": {
6211///          "description": "Describes how important this data is for operating the server.\n\nA value of 1 means \"most important,\" and indicates that the data is\neffectively required, while 0 means \"least important,\" and indicates that\nthe data is entirely optional.",
6212///          "type": "number",
6213///          "maximum": 1.0,
6214///          "minimum": 0.0
6215///        }
6216///      }
6217///    },
6218///    "text": {
6219///      "description": "The text content of the message.",
6220///      "type": "string"
6221///    },
6222///    "type": {
6223///      "type": "string",
6224///      "const": "text"
6225///    }
6226///  }
6227///}
6228/// ```
6229/// </details>
6230#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
6231pub struct TextContent {
6232    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6233    pub annotations: ::std::option::Option<TextContentAnnotations>,
6234    ///The text content of the message.
6235    pub text: ::std::string::String,
6236    #[serde(rename = "type")]
6237    pub type_: ::std::string::String,
6238}
6239impl ::std::convert::From<&TextContent> for TextContent {
6240    fn from(value: &TextContent) -> Self {
6241        value.clone()
6242    }
6243}
6244///TextContentAnnotations
6245///
6246/// <details><summary>JSON schema</summary>
6247///
6248/// ```json
6249///{
6250///  "type": "object",
6251///  "properties": {
6252///    "audience": {
6253///      "description": "Describes who the intended customer of this object or data is.\n\nIt can include multiple entries to indicate content useful for multiple audiences (e.g., `[\"user\", \"assistant\"]`).",
6254///      "type": "array",
6255///      "items": {
6256///        "$ref": "#/definitions/Role"
6257///      }
6258///    },
6259///    "priority": {
6260///      "description": "Describes how important this data is for operating the server.\n\nA value of 1 means \"most important,\" and indicates that the data is\neffectively required, while 0 means \"least important,\" and indicates that\nthe data is entirely optional.",
6261///      "type": "number",
6262///      "maximum": 1.0,
6263///      "minimum": 0.0
6264///    }
6265///  }
6266///}
6267/// ```
6268/// </details>
6269#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
6270pub struct TextContentAnnotations {
6271    ///Describes who the intended customer of this object or data is.
6272    ///
6273    ///It can include multiple entries to indicate content useful for multiple audiences (e.g., `["user", "assistant"]`).
6274    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
6275    pub audience: ::std::vec::Vec<Role>,
6276    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6277    pub priority: ::std::option::Option<f64>,
6278}
6279impl ::std::convert::From<&TextContentAnnotations> for TextContentAnnotations {
6280    fn from(value: &TextContentAnnotations) -> Self {
6281        value.clone()
6282    }
6283}
6284impl ::std::default::Default for TextContentAnnotations {
6285    fn default() -> Self {
6286        Self {
6287            audience: Default::default(),
6288            priority: Default::default(),
6289        }
6290    }
6291}
6292///TextResourceContents
6293///
6294/// <details><summary>JSON schema</summary>
6295///
6296/// ```json
6297///{
6298///  "type": "object",
6299///  "required": [
6300///    "text",
6301///    "uri"
6302///  ],
6303///  "properties": {
6304///    "mimeType": {
6305///      "description": "The MIME type of this resource, if known.",
6306///      "type": "string"
6307///    },
6308///    "text": {
6309///      "description": "The text of the item. This must only be set if the item can actually be represented as text (not binary data).",
6310///      "type": "string"
6311///    },
6312///    "uri": {
6313///      "description": "The URI of this resource.",
6314///      "type": "string",
6315///      "format": "uri"
6316///    }
6317///  }
6318///}
6319/// ```
6320/// </details>
6321#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq, Default)]
6322pub struct TextResourceContents {
6323    ///The MIME type of this resource, if known.
6324    #[serde(
6325        rename = "mimeType",
6326        default,
6327        skip_serializing_if = "::std::option::Option::is_none"
6328    )]
6329    pub mime_type: ::std::option::Option<::std::string::String>,
6330    ///The text of the item. This must only be set if the item can actually be represented as text (not binary data).
6331    pub text: ::std::string::String,
6332    ///The URI of this resource.
6333    pub uri: ::std::string::String,
6334}
6335impl ::std::convert::From<&TextResourceContents> for TextResourceContents {
6336    fn from(value: &TextResourceContents) -> Self {
6337        value.clone()
6338    }
6339}
6340///Definition for a tool the client can call.
6341///
6342/// <details><summary>JSON schema</summary>
6343///
6344/// ```json
6345///{
6346///  "description": "Definition for a tool the client can call.",
6347///  "type": "object",
6348///  "required": [
6349///    "inputSchema",
6350///    "name"
6351///  ],
6352///  "properties": {
6353///    "description": {
6354///      "description": "A human-readable description of the tool.",
6355///      "type": "string"
6356///    },
6357///    "inputSchema": {
6358///      "description": "A JSON Schema object defining the expected parameters for the tool.",
6359///      "type": "object",
6360///      "required": [
6361///        "type"
6362///      ],
6363///      "properties": {
6364///        "properties": {
6365///          "type": "object",
6366///          "additionalProperties": {
6367///            "type": "object",
6368///            "additionalProperties": true
6369///          }
6370///        },
6371///        "required": {
6372///          "type": "array",
6373///          "items": {
6374///            "type": "string"
6375///          }
6376///        },
6377///        "type": {
6378///          "type": "string",
6379///          "const": "object"
6380///        }
6381///      }
6382///    },
6383///    "name": {
6384///      "description": "The name of the tool.",
6385///      "type": "string"
6386///    }
6387///  }
6388///}
6389/// ```
6390/// </details>
6391#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
6392pub struct Tool {
6393    ///A human-readable description of the tool.
6394    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6395    pub description: ::std::option::Option<::std::string::String>,
6396    #[serde(rename = "inputSchema")]
6397    pub input_schema: ToolInputSchema,
6398    ///The name of the tool.
6399    pub name: ::std::string::String,
6400}
6401impl ::std::convert::From<&Tool> for Tool {
6402    fn from(value: &Tool) -> Self {
6403        value.clone()
6404    }
6405}
6406///A JSON Schema object defining the expected parameters for the tool.
6407///
6408/// <details><summary>JSON schema</summary>
6409///
6410/// ```json
6411///{
6412///  "description": "A JSON Schema object defining the expected parameters for the tool.",
6413///  "type": "object",
6414///  "required": [
6415///    "type"
6416///  ],
6417///  "properties": {
6418///    "properties": {
6419///      "type": "object",
6420///      "additionalProperties": {
6421///        "type": "object",
6422///        "additionalProperties": true
6423///      }
6424///    },
6425///    "required": {
6426///      "type": "array",
6427///      "items": {
6428///        "type": "string"
6429///      }
6430///    },
6431///    "type": {
6432///      "type": "string",
6433///      "const": "object"
6434///    }
6435///  }
6436///}
6437/// ```
6438/// </details>
6439#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
6440pub struct ToolInputSchema {
6441    #[serde(
6442        default,
6443        skip_serializing_if = ":: std :: collections :: BTreeMap::is_empty"
6444    )]
6445    pub properties: ::std::collections::BTreeMap<
6446        ::std::string::String,
6447        ::serde_json::Map<::std::string::String, ::serde_json::Value>,
6448    >,
6449    #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
6450    pub required: ::std::vec::Vec<::std::string::String>,
6451    #[serde(rename = "type")]
6452    pub type_: ::std::string::String,
6453}
6454impl ::std::convert::From<&ToolInputSchema> for ToolInputSchema {
6455    fn from(value: &ToolInputSchema) -> Self {
6456        value.clone()
6457    }
6458}
6459///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.
6460///
6461/// <details><summary>JSON schema</summary>
6462///
6463/// ```json
6464///{
6465///  "description": "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.",
6466///  "type": "object",
6467///  "required": [
6468///    "method"
6469///  ],
6470///  "properties": {
6471///    "method": {
6472///      "type": "string",
6473///      "const": "notifications/tools/list_changed"
6474///    },
6475///    "params": {
6476///      "type": "object",
6477///      "properties": {
6478///        "_meta": {
6479///          "description": "This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications.",
6480///          "type": "object",
6481///          "additionalProperties": {}
6482///        }
6483///      },
6484///      "additionalProperties": {}
6485///    }
6486///  }
6487///}
6488/// ```
6489/// </details>
6490#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
6491pub struct ToolListChangedNotification {
6492    pub method: ::std::string::String,
6493    #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6494    pub params: ::std::option::Option<ToolListChangedNotificationParams>,
6495}
6496impl ::std::convert::From<&ToolListChangedNotification> for ToolListChangedNotification {
6497    fn from(value: &ToolListChangedNotification) -> Self {
6498        value.clone()
6499    }
6500}
6501///ToolListChangedNotificationParams
6502///
6503/// <details><summary>JSON schema</summary>
6504///
6505/// ```json
6506///{
6507///  "type": "object",
6508///  "properties": {
6509///    "_meta": {
6510///      "description": "This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications.",
6511///      "type": "object",
6512///      "additionalProperties": {}
6513///    }
6514///  },
6515///  "additionalProperties": {}
6516///}
6517/// ```
6518/// </details>
6519#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
6520pub struct ToolListChangedNotificationParams {
6521    ///This parameter name is reserved by MCP to allow clients and servers to attach additional metadata to their notifications.
6522    #[serde(
6523        rename = "_meta",
6524        default,
6525        skip_serializing_if = "::serde_json::Map::is_empty"
6526    )]
6527    pub meta: ::serde_json::Map<::std::string::String, ::serde_json::Value>,
6528}
6529impl ::std::convert::From<&ToolListChangedNotificationParams>
6530    for ToolListChangedNotificationParams
6531{
6532    fn from(value: &ToolListChangedNotificationParams) -> Self {
6533        value.clone()
6534    }
6535}
6536impl ::std::default::Default for ToolListChangedNotificationParams {
6537    fn default() -> Self {
6538        Self {
6539            meta: Default::default(),
6540        }
6541    }
6542}
6543///Sent from the client to request cancellation of resources/updated notifications from the server. This should follow a previous resources/subscribe request.
6544///
6545/// <details><summary>JSON schema</summary>
6546///
6547/// ```json
6548///{
6549///  "description": "Sent from the client to request cancellation of resources/updated notifications from the server. This should follow a previous resources/subscribe request.",
6550///  "type": "object",
6551///  "required": [
6552///    "method",
6553///    "params"
6554///  ],
6555///  "properties": {
6556///    "method": {
6557///      "type": "string",
6558///      "const": "resources/unsubscribe"
6559///    },
6560///    "params": {
6561///      "type": "object",
6562///      "required": [
6563///        "uri"
6564///      ],
6565///      "properties": {
6566///        "uri": {
6567///          "description": "The URI of the resource to unsubscribe from.",
6568///          "type": "string",
6569///          "format": "uri"
6570///        }
6571///      }
6572///    }
6573///  }
6574///}
6575/// ```
6576/// </details>
6577#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
6578pub struct UnsubscribeRequest {
6579    pub method: ::std::string::String,
6580    pub params: UnsubscribeRequestParams,
6581}
6582impl ::std::convert::From<&UnsubscribeRequest> for UnsubscribeRequest {
6583    fn from(value: &UnsubscribeRequest) -> Self {
6584        value.clone()
6585    }
6586}
6587///UnsubscribeRequestParams
6588///
6589/// <details><summary>JSON schema</summary>
6590///
6591/// ```json
6592///{
6593///  "type": "object",
6594///  "required": [
6595///    "uri"
6596///  ],
6597///  "properties": {
6598///    "uri": {
6599///      "description": "The URI of the resource to unsubscribe from.",
6600///      "type": "string",
6601///      "format": "uri"
6602///    }
6603///  }
6604///}
6605/// ```
6606/// </details>
6607#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug, PartialEq)]
6608pub struct UnsubscribeRequestParams {
6609    ///The URI of the resource to unsubscribe from.
6610    pub uri: ::std::string::String,
6611}
6612impl ::std::convert::From<&UnsubscribeRequestParams> for UnsubscribeRequestParams {
6613    fn from(value: &UnsubscribeRequestParams) -> Self {
6614        value.clone()
6615    }
6616}