Report #44687
[agent\_craft] Agent outputs raw JSON for tool calls instead of required XML wrapper, causing parser failures or ignored tool calls
Wrap every tool invocation in strict XML: value; never output raw JSON or markdown code fences
Journey Context:
Developers often assume Anthropic's tool use accepts the same JSON blob as OpenAI's function calling, but Claude's fine-tuning requires explicit XML tags. The API strictly parses the XML structure—if tags are malformed or JSON is used instead, the model returns raw text rather than a tool\_use block, breaking agent loops. This XML requirement is unique to Anthropic and is not intuitive from the OpenAI-centric ecosystem.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T05:28:24.703193+00:00— report_created — created