You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Cargo.toml
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -45,5 +45,7 @@ latest = ["2025_03_26"]
45
45
2025_03_26 = []
46
46
# enabled mcp schema version 2024_11_05
47
47
2024_11_05 = []
48
+
# enabled draft mcp schema
49
+
draft = []
48
50
# Enables `schema_utils`, which provides utility types that simplify communication with MCP messages, improving ease of use while reducing potential mistakes ane errors when constructing messages.
A type-safe implementation of the official Model Context Protocol (MCP) schema in Rust, supporting both the `2024_11_05`and `2025_03_26` versions.
12
+
A type-safe Rust implementation of the official Model Context Protocol (MCP) schema, supporting all official released versions including `2024_11_05`, `2025_03_26`, and `draft` version for early adoption.
13
13
14
14
The MCP schemas in this repository are [automatically generated](#how-are-schemas-generated) from the official Model Context Protocol, ensuring they are always up-to-date and aligned with the latest official specifications.
15
15
@@ -46,7 +46,7 @@ Focus on your app's logic while [rust-mcp-sdk](https://crates.io/crates/rust-mcp
46
46
47
47
- 🧩 Type-safe implementation of the MCP protocol specification.
48
48
- 💎 Auto-generated schemas are always synchronized with the official schema specifications.
49
-
- 📜 Includes both schema versions : `2024_11_05` and `2025_03_26`.
49
+
- 📜 Includes all official released versions : `2024_11_05` and `2025_03_26` and `draft` version for early adoption.
50
50
- 🛠 Complimentary schema utility module (schema_utils) to boost productivity and ensure development integrity.
51
51
52
52
## How can this crate be used?
@@ -68,10 +68,11 @@ For more information on the MCP architecture, refer to the [official documentati
68
68
69
69
## Schema Versions
70
70
71
-
This repository provides all versions of the schema, which can be selected using Cargo features:
71
+
This repository provides all official released versions the schema , including draft version, enabling you to prepare and adapt your applications ahead of upcoming official schema releases.
72
72
73
73
-[2024_11_05](src/generated_schema/2024_11_05)
74
74
-[2025_03_26](src/generated_schema/2025_03_26)
75
+
-[draft](src/generated_schema/draft)
75
76
76
77
### How to switch between different schema versions?
/// "description": "A human-readable name for this resource.\n\nThis can be used by clients to populate UI elements.",
4238
4247
/// "type": "string"
4239
4248
/// },
4249
+
/// "size": {
4250
+
/// "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.",
4251
+
/// "type": "integer"
4252
+
/// },
4240
4253
/// "uri": {
4241
4254
/// "description": "The URI of this resource.",
4242
4255
/// "type": "string",
@@ -4261,6 +4274,10 @@ pub struct Resource {
4261
4274
/**A human-readable name for this resource.
4262
4275
This can be used by clients to populate UI elements.*/
4263
4276
pubname:::std::string::String,
4277
+
/**The size of the raw resource content, in bytes (i.e., before base64 encoding or any tokenization), if known.
4278
+
This can be used by Hosts to display file sizes and estimate context window usage.*/
@@ -5549,15 +5575,15 @@ received from untrusted servers.*/
5549
5575
///
5550
5576
/// ```json
5551
5577
///{
5552
-
/// "description": "Additional properties describing a Tool to clients.\n\nNOTE: all properties in ToolAnnotations are **hints**.\nThey are not guaranteed to provide a faithful description of\ntool behavior (including descriptive properties like title).\n\nClients should never make tool use decisions based on ToolAnnotations\nreceived from untrusted servers.",
5578
+
/// "description": "Additional properties describing a Tool to clients.\n\nNOTE: all properties in ToolAnnotations are **hints**.\nThey are not guaranteed to provide a faithful description of\ntool behavior (including descriptive properties like title).\n\nClients should never make tool use decisions based on ToolAnnotations\nreceived from untrusted servers.",
5553
5579
/// "type": "object",
5554
5580
/// "properties": {
5555
5581
/// "destructiveHint": {
5556
5582
/// "description": "If true, the tool may perform destructive updates to its environment.\nIf false, the tool performs only additive updates.\n\n(This property is meaningful only when readOnlyHint == false)\n\nDefault: true",
5557
5583
/// "type": "boolean"
5558
5584
/// },
5559
5585
/// "idempotentHint": {
5560
-
/// "description": "If true, calling the tool repeatedly with the same arguments\nwill have no additional effect on the its environment.\n\n(This property is meaningful only when readOnlyHint == false)\n\nDefault: false",
5586
+
/// "description": "If true, calling the tool repeatedly with the same arguments\nwill have no additional effect on the its environment.\n\n(This property is meaningful only when readOnlyHint == false)\n\nDefault: false",
5561
5587
/// "type": "boolean"
5562
5588
/// },
5563
5589
/// "openWorldHint": {
@@ -5850,6 +5876,11 @@ impl<'de> serde::Deserialize<'de> for ClientRequest {
5850
5876
let req = serde_json::from_value::<ListResourcesRequest>(value).map_err(serde::de::Error::custom)?;
0 commit comments