-
Notifications
You must be signed in to change notification settings - Fork 466
Closed
Description
Describe the bug
The example in crates/rmcp/README.md does not build with rmcp 0.6.0.
To Reproduce
Steps to reproduce the behavior:
- Copy the code into
src/main.rsin a newcounterproject cargo build
Expected behavior
It builds successfully.
Logs
The errors actually observed (edited for brevity):
error: cannot find attribute `tool_handler` in this scope
--> src/main.rs:39:3
39 | #[tool_handler]
| ^^^^^^^^^^^^
help: consider importing one of these attribute macros
1 + use rmcp::tool_handler;
1 + use rmcp_macros::tool_handler;
error[E0405]: cannot find trait `Future` in this scope
--> src/main.rs:20:5
20 | #[tool(description = "Increment the counter by 1")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
= note: this error originates in the attribute macro `tool` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider importing this trait
1 + use std::future::Future;
warning: unused import: `handler::server::tool::ToolCallContext`
--> src/main.rs:1:94
1 | ...:*, tool, tool_router, transport::stdio, handler::server::tool::ToolCallContext, handler::server::router::tool::ToolRout...
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: `#[warn(unused_imports)]` on by default
Additional context
I will make a PR to fix this once I verify the counter server works locally under Claude Code.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels