Skip to content

feat!: update crates to default to the latest MCP schema version. #35

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 19 additions & 18 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ rust-mcp-sdk = { path = "crates/rust-mcp-sdk", default-features = false }
rust-mcp-macros = { version = "0.2.1", path = "crates/rust-mcp-macros" }

# External crates
rust-mcp-schema = { version = "0.4" }
rust-mcp-schema = { version = "0.5" }
futures = { version = "0.3" }
tokio = { version = "1.4", features = ["full"] }
serde = { version = "1.0", features = ["derive", "serde_derive"] }
Expand Down
13 changes: 13 additions & 0 deletions crates/rust-mcp-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,16 @@ workspace = true

[lib]
proc-macro = true


[features]
# defalt features
default = ["2025_03_26"] # Default features

# activates the latest MCP schema version, this will be updated once a new version of schema is published
latest = ["2025_03_26"]

# enabled mcp schema version 2025_03_26
2025_03_26 = ["rust-mcp-schema/2025_03_26"]
# enabled mcp schema version 2024_11_05
2024_11_05 = ["rust-mcp-schema/2024_11_05"]
12 changes: 12 additions & 0 deletions crates/rust-mcp-macros/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ The `mcp_tool` macro generates an implementation for the annotated struct that i
#[mcp_tool(
name = "write_file",
description = "Create a new file or completely overwrite an existing file with new content."
destructive_hint = false
idempotent_hint = false
open_world_hint = false
read_only_hint = false
)]
#[derive(rust_mcp_macros::JsonSchema)]
pub struct WriteFileTool {
Expand Down Expand Up @@ -60,3 +64,11 @@ fn main() {
<img align="top" src="assets/rust-mcp-stack-icon.png" width="24" style="border-radius:0.2rem;"> Check out [rust-mcp-sdk](https://github.com/rust-mcp-stack/rust-mcp-sdk) , a high-performance, asynchronous toolkit for building MCP servers and clients. Focus on your app's logic while [rust-mcp-sdk](https://github.com/rust-mcp-stack/rust-mcp-sdk) takes care of the rest!

---


**Note**: The following attributes are available only in version `2025_03_26` and later of the MCP Schema, and their values will be used in the [annotations](https://github.com/rust-mcp-stack/rust-mcp-schema/blob/main/src/generated_schema/2025_03_26/mcp_schema.rs#L5557) attribute of the *[Tool struct](https://github.com/rust-mcp-stack/rust-mcp-schema/blob/main/src/generated_schema/2025_03_26/mcp_schema.rs#L5554-L5566).

- `destructive_hint`
- `idempotent_hint`
- `open_world_hint`
- `read_only_hint`
Loading
Loading