-
Notifications
You must be signed in to change notification settings - Fork 384
Open
Description
Describe the bug
tool macro expands to serde_json
here which causes compilation error in crates that don't have it as a dependency.
To Reproduce
Steps to reproduce the behavior:
- cargo new asdf
- cd asdf
- cargo add rcmp -F macros
- add basic tool call to src/main.rs
struct A;
#[rmcp::tool_router]
impl A {
#[rmcp::tool]
async fn foo() {}
}
- error[E0433]: failed to resolve: use of unresolved module or unlinked crate
serde_json
Proposed solution
Other location in the macro already assumes the downstream crate depends on rmcp
, so expanding the macro to use the re-exported ::rmcp::serde_json::...
should work.
Metadata
Metadata
Assignees
Labels
No labels