all scenarios

Result is a bare string

wrong-result-shape · Tools — execution

Endpoint (Streamable HTTP)
https://chaos-mcp.thomascdnns.com/s/wrong-result-shape/mcp
On the wire — recorded from a real request
your clientchaos-mcp01initializePOST /s/wrong-result-shape/mcp200 OK · application/json · 1 ms"jsonrpc""2.0""id"1"result""protocolVersion""2024-11-05""capabilities""tools""serverInfo""name""chaos-mcp/wrong-result-shape""version""1.0.0""instructions""chaos-mcp scenario: wrong-result-shape — Result is a bare string"02tools/call raw_stringPOST /s/wrong-result-shape/mcp200 OK · application/json · 1 ms"jsonrpc""2.0""id"2"result""just a string, no content array here"

Symptom

what you'll observe

Client can't find content[]; the result is a plain string, not the expected object.

Cause

what this reproduces

Returning the tool's value directly instead of wrapping it in {content:[{type:text,...}]}.

Fix

how you'd resolve it

Wrap tool output in the MCP result envelope with a typed content array.

Try it with curl
bash
curl -sS -X POST \
  https://chaos-mcp.thomascdnns.com/s/wrong-result-shape/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"

'