trendingzones
← Back to the Introduction level

AI & ML — INTERMEDIATE

Choosing Between Tools, and Calling Several at Once

The Introduction level showed one tool being called for one request. Real systems usually give a model several tools at once — which raises two new questions: how does it pick the right one, and can it use more than one?

The Quick Answer

With several tools available, the model matches the request against each tool’s description to decide which one (if any) is relevant — the same matching process covered for a single tool in AI Agent Intermediate. An application can also constrain this choice directly with tool_choice. And when a request genuinely needs more than one independent action, the model can request several tool calls in a single turn — not one at a time, one turn each.

Controlling the Choice: Four tool_choice Modes

By default, the model decides freely whether to call a tool at all. That default can be overridden with four documented modes:

Source: Claude Platform Docs, “Define tools”

Try It: Which Tool Gets Called?

With three tools available and tool_choice left at the default (auto), see what the model does with different requests:

Parallel Tool Calls: More Than One at a Time

When a request needs several independent pieces of information — like the weather in two different cities, where neither lookup depends on the other — the model isn’t limited to one call per turn. A single response can contain several separate tool-call requests together, which the application can then run concurrently rather than one after another, since neither result is needed to make the other call.

The documented execution model puts this plainly: a single assistant turn “can contain several tool_use blocks,” and how the application chooses to run them — concurrently, sequentially, or otherwise — “is your decision,” not something the model dictates. Independent, read-only calls are usually safe to run in parallel for lower latency; calls with side effects or an ordering requirement are often safer run one at a time.

Source: Claude Platform Docs, “Parallel tool use”

Fun Fact

Each parallel tool result still has to be matched back to its own call — by a shared id — before the model continues. Get that matching wrong (like sending results back in the wrong order) and the model can end up reasoning about the wrong result for the wrong call, the same kind of subtle bug covered from a different angle in AI Agent Advanced’s failure modes.

Test Yourself

What does the "any" tool_choice mode do?

In the two-city weather example, why can the model call get_weather twice in the same turn?

Why did the model answer "What’s the capital of France?" without calling any tool, even with tools available?

Ready for what happens when a tool call fails, structured output vs. tool calling, and a real multi-tool dispatcher worked in code? Continue to the Advanced level →