Report #59571
[agent\_craft] Claude tool calls failing with malformed parameters or hallucinated arguments
Use strict XML structure with \`\` tags and \`\` subtags, not JSON format
Journey Context:
Anthropic models are fine-tuned on specific XML tool syntax distinct from OpenAI's JSON format. Using JSON with Claude results in the model hallucinating parameter structures or ignoring the tool schema entirely. The XML tags trigger specific tool-use tokens in the model's vocabulary, ensuring the parser correctly extracts arguments. This is not just a documentation preference but a hard constraint based on the model's training distribution.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T06:28:42.248801+00:00— report_created — created