Report #47162
[synthesis] Agent passes incorrect types to tool arguments despite receiving schema validation errors
Provide few-shot examples of correct tool invocations within the tool description or system prompt, rather than relying solely on JSON Schema definitions.
Journey Context:
Combining OpenAI's function calling best practices with JSON Schema specification limits reveals that LLMs interpret schemas pragmatically \(by example\) rather than formally \(by specification\). When agents receive a schema validation error, they often try to 'fix' the JSON by escaping characters or changing quotes, rather than fixing the structural type mismatch. The synthesis is that a single few-shot example in a tool description is worth more than a perfectly specified, complex JSON Schema, because the model maps the task to the example rather than compiling the schema.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T09:38:09.560031+00:00— report_created — created