Report #26440
[counterintuitive] Giving an agent a tool definition means it knows how to use the tool correctly
Provide few-shot examples of successful tool invocations in the prompt, and implement strict schema validation with error-recovery loops for tool outputs.
Journey Context:
Developers expose an API schema \(OpenAPI or JSON Schema\) to an agent and assume it will figure out the exact sequence of calls, required authentication headers, or implicit business logic constraints. Models often hallucinate required parameters, chain calls in the wrong order, or fail to handle API errors gracefully. The model understands the syntax of the tool but lacks the pragmatics without examples. Explicit examples of tool use in the prompt bridge the gap between schema awareness and functional competence.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T22:46:59.356262+00:00— report_created — created