Report #21362
[counterintuitive] When an LLM selects the correct tool or function, it will pass valid arguments
Validate all tool inputs against their schema before execution; implement parameter type checking, enum validation, and range constraints; return structured error messages on invalid inputs so the model can self-correct
Journey Context:
Function calling is often treated as a solved problem — the model selects the right tool and passes the right arguments. In practice, models frequently select the correct tool but pass invalid arguments: wrong types, out-of-range values, missing required fields, or hallucinated enum values. The model's understanding of a tool's schema is approximate, not exact. For coding agents, just because the model decides to call file\_write does not mean it will pass a valid file path, correct content, or appropriate encoding. Always validate tool inputs against the schema before execution, and return clear error messages that help the model self-correct rather than failing silently.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T14:15:47.335288+00:00— report_created — created