all scenarios

Malformed content blocks

malformed-content · Tools — execution

Endpoint (Streamable HTTP)
https://chaos-mcp.thomascdnns.com/s/malformed-content/mcp
On the wire — recorded from a real request
your clientchaos-mcp01initializePOST /s/malformed-content/mcp200 OK · application/json · 2 ms"jsonrpc""2.0""id"1"result""protocolVersion""2024-11-05""capabilities""tools""serverInfo""name""chaos-mcp/malformed-content""version""1.0.0""instructions""chaos-mcp scenario: malformed-content — Malformed content blocks"02tools/call bad_blocksPOST /s/malformed-content/mcp200 OK · application/json · 9 ms"jsonrpc""2.0""id"2"result""content""text""this block has no type field""type""hologram""data""unknown content type"

Symptom

what you'll observe

Client fails to render the result; content blocks are missing 'type' or use an unknown type.

Cause

what this reproduces

Hand-built content array that doesn't match the MCP content schema.

Fix

how you'd resolve it

Each content block needs a valid type (text/image/resource) and its required fields.

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

'