Sub topic 6
Describing each parameter so the model fills it correctly
This chapter assumes you can read JSON Schema basics (string, integer, object) and short Python examples. You should also know how a tool definition reaches the model during a tool-calling loop.
Why parameter descriptions matter
The model never sees your code. It sees the parameter name, its type, and its description text. From those alone it must decide what value to send. If the description is missing, the model guesses from the name, and guesses are where most bad arguments come from.
Compare two versions of the same parameter:
- Weak:
"created_after": { "type": "string" } - Strong:
"created_after": { "type": "string", "description": "Only return orders created on or after this date, in YYYY-MM-DD format." }
The weak version could receive "last month", "11/03/2026", or "yesterday". The strong version tells the model the format and the meaning of the filter.
What a good parameter description contains
Cover these points, and skip any that do not apply:
- Meaning. What the value is used for, not just its name.
- Format. Date format, ID prefix, units, casing.
- An example. One concrete value, such as
'cus_4821'. - Default or omission behavior. What happens if the model leaves it out.
- Where to get it. If the model may not know the value, say so: "Ask the user if you do not know it."
A worked example
This is the search_orders definition from this tutorial. Each description does a different job.
{
"name": "search_orders",
"description": "Search a customer's orders by status and date. Use this when the user does not give an order ID. If the user gives an order ID, use get_order instead. Returns up to `limit` orders, newest first, each with id, status, total, and created_at.",
"input_schema": {
"type": "object",
"properties": {
"customer_id": {
"type": "string",
"description": "Customer ID, for example 'cus_4821'. Ask the user if you do not know it."
},
"status": {
"type": "string",
"enum": ["pending", "shipped", "delivered", "cancelled"],
"description": "Only return orders with this status. Omit to include all statuses."
},
"created_after": {
"type": "string",
"description": "Only return orders created on or after this date, in YYYY-MM-DD format."
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 50,
"description": "Maximum number of orders to return. Defaults to 10 if omitted."
}
},
"required": ["customer_id"]
}
}customer_idgives an example and tells the model to ask the user instead of inventing an ID.statussays what omitting it does, so the model does not send an empty string or "all".created_afterstates inclusivity and the date format.limitstates the default, which the schema'sminimumandmaximumcannot express.
Common mistakes
| Mistake | What the model does | Fix |
|---|---|---|
| Name only, no description | Guesses the format | Add meaning and format |
| Repeating the name ("The status") | Gains no information | Say what the value filters or controls |
| Hidden default | Always sends a value | State the default and how to omit |
| Format only in the tool description | Misses it for the specific field | Put it on the parameter |
Exercise
A parameter "since": { "type": "string" } receives values like "last week" and "3/4". Rewrite it so the model sends a consistent value, and say what else you would state in the description.
Show answer
Use "since": { "type": "string", "description": "Only include records created on or after this date, in YYYY-MM-DD format, for example '2026-03-04'. Omit to include all dates." }. The description gives the meaning (a lower bound, inclusive), the exact format, an example, and the behavior when omitted.