Report #45134
[synthesis] Model returns markdown inside JSON tool call responses
Explicitly specify 'plain text, no markdown' in the tool description or system prompt, because Claude 3.5 will wrap string values in markdown backticks inside JSON, breaking downstream parsers.
Journey Context:
When using tool calls that return structured data, developers often assume the string fields will be clean. However, Claude 3.5 Sonnet has a strong bias towards formatting and will insert markdown \(e.g., \*\*bold\*\* or code blocks\) inside JSON string values. GPT-4o generally respects the JSON schema but might add \\n characters. Gemini is highly compliant but occasionally escapes quotes weirdly. To ensure clean JSON extraction, the prompt must explicitly forbid markdown formatting within the tool's output schema description.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T06:13:33.419994+00:00— report_created — created