Skip to lesson

AnthropicClaude Certified Architect – Foundations2026-102.3 Distribute tools appropriately across agents and configure tool choice

Tool choice

Completed by opening the official lab

Why it matters

Section 2.3 asks when a turn may answer in text and when it must call a tool. This notebook shows each tool_choice setting changing that outcome on the same prompts.

What to practise

Start with {"type": "auto"} and a web_search tool, and see the system prompt decide whether Claude searches or answers from memory. Then give Claude a sentiment tool and a calculator behind a deliberately thin prompt: under auto it skips the sentiment tool or reaches for the calculator, and under {"type": "tool", "name": "print_sentiment_scores"} it calls the named tool every time. Last, build an SMS assistant with {"type": "any"} and check that every reply, even to gibberish, is a call to one of its two tools rather than plain text.

How it fits

This puts three of the four modes of 2.3.4 into practice; the notebook leaves out none. Named-tool forcing is how 2.3.5 gates a required first step, and 2.3.5 also shows application control flow holding the order where forcing is unavailable.