all scenarios

tools/call returns JSON-RPC error

tool-rpc-error · Tools — execution

Endpoint (Streamable HTTP)
https://chaos-mcp.thomascdnns.com/s/tool-rpc-error/mcp
On the wire — recorded from a real request
your clientchaos-mcp01initializePOST /s/tool-rpc-error/mcp200 OK · application/json · 1 ms"jsonrpc""2.0""id"1"result""protocolVersion""2024-11-05""capabilities""tools""serverInfo""name""chaos-mcp/tool-rpc-error""version""1.0.0""instructions""chaos-mcp scenario: tool-rpc-error — tools/call returns JSON-RPC error"02tools/call throwsPOST /s/tool-rpc-error/mcp200 OK · application/json · 2 ms"jsonrpc""2.0""id"2"error""code"-32603"message""unhandled exception in tool handler"

Symptom

what you'll observe

Instead of a result with isError, the whole call fails with a JSON-RPC error object.

Cause

what this reproduces

The server throws and maps the exception to a protocol error rather than a tool result.

Fix

how you'd resolve it

Decide deliberately: recoverable tool failures → isError result; protocol faults → JSON-RPC error.

Try it with curl
bash
curl -sS -X POST \
  https://chaos-mcp.thomascdnns.com/s/tool-rpc-error/mcp \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '
"jsonrpc""2.0"
"id"1
"method""initialize"
"params"
"protocolVersion""2024-11-05"
"capabilities"
"clientInfo""name""curl""version""1"

'