Tool calling requires the Basic plan or higher. Check shuttleai.com/models to see which models support tool calling.
How it works
Model decides to call a tool
If the model determines it needs to use a tool, it responds with a
tool_calls array instead of a regular message.Example: Weather lookup
1. Define the tool
2. Send the request
3. Handle the tool call
Full example
Here’s the complete flow in one script:Parallel tool calls
Models can request multiple tool calls in a single response. For example, if the user asks “What’s the weather in Tokyo and New York?”, the model may return two tool calls at once. Always iterate over the fulltool_calls array and return results for all of them before sending the next request.
Tool choice
Control when the model uses tools withtool_choice:
| Value | Behavior |
|---|---|
"auto" | Model decides whether to call a tool (default) |
"none" | Model will never call tools |
"required" | Model must call at least one tool |
{"type": "function", "function": {"name": "..."}} | Force a specific tool |
Streamed tool calls
Tool calls work with streaming too. When streaming, tool call arguments arrive incrementally across chunks. The OpenAI SDK handles this automatically.Supported models
Tool calling is supported on models that have the Tools badge at shuttleai.com/models, including:- ShuttleAI Auto
- GPT-5.2
- Claude Opus 4.6
- Claude Sonnet 4.6
- Claude Haiku 4.5