Skip to main content

wrap_tool_response

Function wrap_tool_response 

Source
pub fn wrap_tool_response(id: Option<Value>, resp: Response) -> Response
Expand description

Translate an ATD Response (from run_tool) into the MCP wire shape the HTTP listener returns. Mirrors celia-cli/src/http_server.rs:497-525 for the success / execution_failed branches; non-result Response variants (capability denied, broker error, internal) map to the JSON-RPC error envelope per SP-streamable-http §5.6.