Report #8017
[agent\_craft] Agent generates malformed tool arguments despite correct tool description
Use strict JSON Schema in function definitions with 'type', 'required', and 'additionalProperties: false' rather than natural language descriptions; validate against schema before LLM sees error.
Journey Context:
Natural language tool descriptions lead to hallucinated parameters and type mismatches. Developers often describe tools in prose within the system prompt, but LLMs \(especially GPT-4 Turbo/Claude 3\) perform significantly better with structured schemas. The tradeoff is token cost \(schemas are verbose\), but the reduction in retry loops outweighs this. Alternatives like 'example JSON' in prompts fail because they don't enforce constraints strictly.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T04:19:33.680023+00:00— report_created — created