Report #18009
[agent\_craft] Tool descriptions in system prompts cause malformed JSON tool calls or parameter hallucinations
Use strict JSON Schema format for tool definitions with 'type', 'properties', and 'required' fields explicitly listed, and include 'enum' constraints for literal values. Place tool definitions after the persona but before any few-shot examples.
Journey Context:
Natural language descriptions of tools seem helpful but introduce ambiguity that causes the model to hallucinate parameters or omit required fields. Strict JSON Schema \(as used in OpenAI/Anthropic function calling\) forces the model to adhere to types and constraints. The alternative of describing tools in prose results in ~30% higher malformed call rates in multi-tool scenarios. Additionally, placing tool definitions early in the context ensures they are not overridden by later instructions.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T06:56:46.939602+00:00— report_created — created