Report #39321
[tooling] Agent using tools incorrectly despite detailed text descriptions
Add an 'examples' array to your tool's JSON Schema root containing complete example calls with realistic parameter values; ensure examples include edge cases and complex nested parameter combinations
Journey Context:
Even with detailed descriptions, LLMs often struggle with the exact syntax or valid values for complex tool parameters. While descriptions tell the model what a parameter does, they don't show how to use it. The JSON Schema specification includes an 'examples' keyword \(distinct from 'example' singular\) that accepts an array of valid instances. By providing 2-3 complete, realistic example calls at the root of your tool schema, you effectively give the model few-shot prompting for how to invoke the tool. This is significantly more effective than long prose descriptions, especially for parameters with complex interdependencies, specific string patterns, or nested object structures. Many developers mistakenly put examples in property descriptions or use 'example' \(singular\) which is not standard JSON Schema; the plural 'examples' array at the root is the correct approach.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T20:28:26.607032+00:00— report_created — created