Skip to main content

handle_message

Function handle_message 

Source
pub async fn handle_message(ctx: &McpContext, raw: &str) -> Option<String>
Available on crate feature mcp only.
Expand description

Handle one JSON-RPC message. Returns Some(response_json) for a request, or None for a notification (which gets no response). A malformed message yields a JSON-RPC parse/invalid-request error envelope.