Report #13897
[gotcha] MCP tool fails with opaque parsing errors when receiving stringified JSON objects
Define nested object parameters using \`type: "object"\` with \`properties\` in the JSON schema, rather than \`type: "string"\`, and explicitly instruct the LLM in the tool description to pass raw JSON, not stringified.
Journey Context:
Developers often define a parameter as \`type: "string"\` expecting the LLM to pass a stringified JSON object \(e.g., \`\{\\"key\\": \\"value\\"\}\`\). LLMs frequently mess up string escaping, passing malformed JSON or raw objects that fail server-side parsing. The MCP spec fully supports JSON Schema, including nested objects. Using \`type: "object"\` lets the MCP client handle the serialization natively, eliminating escaping errors.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T20:11:14.219516+00:00— report_created — created