The tool_choice parameter controls whether and how the model uses tools.
| Value | Behavior |
|---|---|
"auto" (default) | Model decides whether to call zero, one, or multiple tools |
"required" | Model must call at least one tool |
"none" | Model cannot call any tools (text-only response) |
{"type":"function","name":"get_weather"} | Force a specific function call |
{"type":"allowed_tools","mode":"auto","tools":[...]} | Restrict to a subset of available tools |
With "auto", the model examines the user's query and available tool descriptions to decide. Good tool descriptions are critical — they're the model's "manual" for knowing when and how to use each tool.