A tool call fails when the model sends arguments the tool does not expect: a name instead of a number, a date in the wrong shape, or a missing field. The schema is the contract, and the description is what the model actually reads, so a wrong call usually means the description does not match the schema.
Before you start
You need a failed tool call from a log or a trace, with the arguments the model sent and the error the tool returned. Keep the tool schema open beside it.
Compare the sent arguments with the schema
Read the arguments the model sent and check each one against the schema: the name, the type and whether it is required. The most common faults are a string where a number is needed, and a field name the model invented. Note which argument is wrong before you change anything.
Rewrite the description with an example
Rewrite the tool description to name each argument, its type and an example value, for example order number as digits only, such as 1042. Run the same question again and check the call now matches the schema. If it still fails, the schema itself may need a clearer type.
Worked example: A wrong argument for a fictional order lookup
Northwind Orders is a fictional orders desk. Its agent called the order lookup with the wrong argument twice. The table shows the fix.
| Attempt | Argument sent | Result |
|---|---|---|
| 1 | order: 'order 1042' | Error: expected digits only |
| 2 | order_number: '1042' | Error: unknown field name |
| 3 | order_id: 1042 | Works, returns the order |
Expected result (UNTESTED): after the description rewrite, the same question produces one call with order_id 1042 and a correct reply. We checked the OpenAI Agents SDK guides, which describe tool schemas built from function signatures, but we did not run the call on this machine.
Limits
A clear description helps, but a model can still invent a field name under pressure. Validate the arguments inside the tool and return a short error naming the expected field, so the model can correct itself on the next turn.
