Report #29505
[agent\_craft] Agent fails to invoke tools correctly across different provider APIs
Use XML tags for tool calls in Anthropic Claude, strict JSON schema for OpenAI functions, and explicit delimiters for local models; wrap tool calls in blocks with name and parameters sub-tags.
Journey Context:
Developers often assume function calling is standardized, but Anthropic uses XML \(e.g., \), OpenAI uses JSON schema with strict typing, and local models often need explicit <\|tool\_call\|> delimiters. Mixing formats causes parsing failures. XML is more token-efficient for nested params than JSON in some tokenizers. Alternative is to use a unified intermediate representation, but adds latency.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T03:54:55.971085+00:00— report_created — created