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
Public test helper for unit-testing custom ServerHandler::call_tool
overrides from outside the rmcp crate. Workspace MCPs that wrap
their tool_router in Arc<RwLock<ToolRouter<Self>>> (to support
runtime mutation via load_tool_group) cannot use #[tool_handler]
and must hand-roll call_tool — that dispatch path bypasses
ToolRouter::call and therefore the post-dispatch
normalize_call_tool_result hook, so each consumer must call the
normalizer manually inside its hand-rolled call_tool.
This helper makes it possible to drive the custom dispatch path
from a unit test without spinning up a full serve_server / transport
stack. Internally constructs a throwaway Peer<RoleServer> via the
crate-internal Peer::new constructor; the receiving channel is
dropped, so any peer-bound notifications the tool body emits
silently no-op. Gated on the existing server feature.
0 commit comments