Skip to content

Commit 5636f38

Browse files
committed
fix(rmcp-macros): use re-exported serde_json path in task_handler
Replace bare `::serde_json::` with `::rmcp::serde_json::` in task_handler.rs to prevent compilation errors in crates that don't directly depend on serde_json. Fixes #487
1 parent 9b507f5 commit 5636f38

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

crates/rmcp-macros/src/task_handler.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ pub fn task_handler(attr: TokenStream, input: TokenStream) -> syn::Result<TokenS
193193
if let Some(tool) = boxed.as_any().downcast_ref::<rmcp::task_manager::ToolCallTaskResult>() {
194194
match &tool.result {
195195
Ok(call_tool) => {
196-
let value = ::serde_json::to_value(call_tool).unwrap_or(::serde_json::Value::Null);
196+
let value = ::rmcp::serde_json::to_value(call_tool).unwrap_or(::rmcp::serde_json::Value::Null);
197197
return Ok(rmcp::model::GetTaskPayloadResult::new(value));
198198
}
199199
Err(err) => return Err(McpError::internal_error(

0 commit comments

Comments
 (0)