Report #6529
[gotcha] MCP server returns a string where an integer was expected, crashing the host or causing unexpected LLM behavior
Validate all tool inputs and outputs against strict JSON schemas at the host boundary, rejecting malformed responses.
Journey Context:
The LLM generates JSON arguments based on the schema, but might wrap a number in quotes. If the host passes this directly to a strongly-typed backend, it might crash or implicitly convert in dangerous ways. The MCP spec relies on JSON Schema, but enforcement is up to the host, leading to silent type coercion vulnerabilities.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T00:18:20.810740+00:00— report_created — created