Report #97340
[architecture] How do I make LLM tool calling reliable in an agent loop?
Write tight JSON schemas with clear descriptions, enums, and minimal required parameters; validate model outputs before executing, return structured tool results as JSON blocks, and feed explicit errors back into the loop. Keep the tool set small and names distinct.
Journey Context:
Most tool-use failures come from ambiguous descriptions or overly large tool sets, not from the model. Anthropic treats tool design as agent-computer interface design: obvious names, poka-yoke arguments, and strict mode for schema conformance. Test tool definitions in a workbench, iterate on descriptions like docstrings, and prefer many focused tools over one multi-purpose tool that confuses the model.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-25T04:57:00.086862+00:00— report_created — created