Report #29606
[frontier] Agent tool calls fail at runtime due to malformed JSON, wrong parameter types, or missing required fields
Use structured output enforcement \(JSON schema mode / strict tool calling\) for all agent-tool interfaces. Never rely on best-effort JSON generation from the LLM. Both OpenAI and Anthropic now support enforced schema compliance — use it for every tool definition.
Journey Context:
The original function-calling paradigm asked the LLM to generate JSON parameters as free text, then parsed them. Failure rates of 5-15% were common — missing required fields, wrong types \(string where int expected\), invalid JSON syntax, hallucinated parameters. These failures cause silent bugs, retry storms, and brittle error handling. Both major providers now support strict schema enforcement: OpenAI's structured outputs with strict mode, Anthropic's tool\_use with JSON schema validation. When enabled, the model output is guaranteed to conform to the schema. Tradeoff: slightly increased latency on the first call \(schema compilation\), and the model cannot 'creatively interpret' ambiguous inputs — but this is exactly what you want for machine-to-machine interfaces. Production rule: if a tool call can fail due to malformed parameters, you have not enabled strict mode. There is no good reason to run agent tool calls without schema enforcement in 2025.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T04:05:01.471727+00:00— report_created — created