Task Statement 2.3·Domain 2 — 18% of exam
Tool Distribution & Tool Choice
Distribute tools appropriately across agents and configure tool choice
Official Exam Guide Objectives
The objectives below are quoted from Anthropic's Claude Certified Architect – Foundations exam guide, v1.1. Read the exam guide summary for the full blueprint.
Task 2.3: Distribute tools appropriately across agents and configure tool choice.
Knowledge of
- The principle that giving an agent access to too many tools (e.g., 18 instead of 4-5) degrades tool selection reliability by increasing decision complexity
- Why agents with tools outside their specialization tend to misuse them (e.g., a synthesis agent attempting web searches)
- Scoped tool access: giving agents only the tools needed for their role, with limited cross-role tools for specific high-frequency needs
- tool_choice configuration options: "auto", "any", and forced tool selection ({"type": "tool", "name": "..."})
Skills in
- Restricting each subagent's tool set to those relevant to its role, preventing cross-specialization misuse
- Replacing generic tools with constrained alternatives (e.g., replacing fetch_url with load_document that validates document URLs)
- Providing scoped cross-role tools for high-frequency needs (e.g., a verify_fact tool for the synthesis agent) while routing complex cases through the coordinator
- Using tool_choice forced selection to ensure a specific tool is called first (e.g., forcing extract_metadata before enrichment tools), then processing subsequent steps in follow-up turns
- Setting tool_choice: "any" to guarantee the model calls a tool rather than returning conversational text
What You Need to Know
How many tools an agent holds is not a packaging question. It changes how often the agent picks the right one, which makes it an architectural decision with production consequences.
Two Levers: Distribution and tool_choice
This task statement covers two independent controls, and many wrong answers come from using one where the other is needed.
| Question | Lever | How long it lasts |
|---|---|---|
| Which tools exist for this agent? | Distribution: the tool set each agent is given | An architectural decision that persists for the agent's whole life |
| Must a tool be called on this request? | tool_choice: a field on one API request | Exactly one request |
A tool set cannot force a particular call to happen now, and tool_choice cannot enforce a rule across a session. Decide which of the two questions the stem is asking before reading the options.
The Tool Overload Problem
Hand a single agent 18 tools and selection reliability falls away. Each addition is one more candidate the model has to tell apart from the rest, and the error rate rises with it. What works is 4-5 tools per agent, chosen for that agent's job.
Count is only half of it. What the tools are for matters as much as how many there are. A synthesis agent should NOT have web search tools. A web search agent should NOT have document analysis tools. Equip an agent beyond its remit and it will find occasions to reach outside it — a synthesis agent holding web_search starts searching for itself rather than working from the results it was given, bypassing the coordinator, repeating work that is already done and spending context to do it.
Stated as a rule: an agent's toolkit stops at the boundary of its role, and anything past that boundary is an invitation to cross it.
Count and relevance both have to fit the role, step 1: The synthesis agent's toolkit grows to 18 tools
Reading the symptom
| Symptom in the stem | Likely cause |
|---|---|
| A specialised agent calls tools that belong to another specialisation | The tool set is not scoped to the role |
| Selection accuracy falls as the platform adds tools | Too many candidates for one agent; split the toolkit by role |
| The right tool exists but is rarely chosen | Its description is weak (Task 2.1), or it is buried among near-duplicates |
The tool_choice Configuration
How the model engages with the toolkit is set by tool_choice. Three settings, three distinct jobs.
"auto" (default) The decision belongs to the model — a tool call or a text reply, whichever fits. Right for general operation, where answering conversationally is sometimes the correct behaviour.
{
"tool_choice": { "type": "auto" }
}"any" A tool call is required; which tool is not. Right when structured output is non-negotiable and several schemas could apply, because plain text stops being a possible outcome.
{
"tool_choice": { "type": "any" }
}Extraction is where this pays. Holding separate schemas for invoices, receipts and contracts against a document whose type nobody has established, "any" guarantees one of them is used rather than the model describing what it found in prose.
Forced selection One named tool, and no discretion about it. Right for a step that must not be skipped or reordered.
{
"tool_choice": { "type": "tool", "name": "extract_metadata" }
}This is how ordering gets enforced. If nothing may run before metadata extraction, forcing the call removes the possibility of the model deciding otherwise and starting with enrichment. Once that call has happened, later turns can return to "auto" for whatever follows.
Four modes, four different guarantees, step 1: auto — the model decides: a tool call, or a text reply
What each setting guarantees
| Setting | Guarantee | Can the reply be plain text? | Use for |
|---|---|---|---|
{"type": "auto"} | None | Yes | Normal agentic operation |
{"type": "any"} | Some tool is called; the model picks which | No | Structured output when several schemas exist and the document type is unknown |
{"type": "tool", "name": "X"} | Tool X is called | No | A known first step; extraction with one known schema |
{"type": "none"} | No tool is called | Yes, always | A text-only turn |
For structured output the choice between the two forcing settings turns on what you know about the input:
| Situation | Choice |
|---|---|
| One extraction schema, document type known | Forced selection of that tool |
| Several schemas, document type unknown; the model must pick one and must not answer in prose | "any" |
| A text answer is acceptable when extraction does not apply | "auto", and the code must handle a text reply |
The middle row is the exam guide's own wording under Task 4.3: "Setting tool_choice: "any" to guarantee structured output when multiple extraction schemas exist and the document type is unknown." Forcing the most common schema instead asserts a document type the stem says is unknown.
One request only
tool_choice constrains the single request it is sent with. The guide's pattern is to force the first call and then process "subsequent steps in follow-up turns", which means releasing the constraint to "auto" after the first response. A loop that keeps sending the forced value has the model call extract_metadata on every turn: the enrichment tools are never reached and the loop only ends when it hits its turn cap.
What tool_choice Cannot Do
| It cannot… | Because | What does |
|---|---|---|
| Enforce an ordering or a rule across a whole session | It applies to one request, and nothing stops the model calling other tools on later turns | A hook that checks each tool call before it runs (Tasks 1.4 and 1.5) |
| Validate the arguments the tool is called with | It selects a tool; it says nothing about the input | strict: true on the tool definition |
| Make a tool exist | It can only name a tool present in the request's tools array | Distribution: give the agent the tool |
Scoped Cross-Role Tools
Occasionally an agent needs a capability that belongs to somebody else's role. Sending every such request back through the coordinator looks correct and is slow: in the official sample question it adds 2-3 round trips per task and increases latency by 40%.
The alternative is a scoped cross-role tool: a deliberately narrowed version of that capability, handed to the agent that keeps needing it.
Consider a synthesis agent checking facts continuously while it writes. Routed through the coordinator, every check becomes a delegation to the search agent, a wait, and a return trip. For the 85% of checks that are simple fact-checks (dates, names, statistics), the entire round trip is overhead.
Give that agent a scoped verify_fact covering simple lookups and those resolve where they arise. Anything genuinely hard — several sources, cross-referencing, a judgement call — still goes through the coordinator. The common case gets the short path and the difficult 15% keeps the full pipeline.
The rule to carry into any variant of this stem: solve the high-frequency simple case with a narrow tool, and keep the coordination path for the low-frequency complex case. Do not hand over the general capability, and do not batch away a dependency the agent needs answered as it works.
The exam tests this pattern directly: official sample question 9 is dissected under How This Is Tested.
The common case earns a shortcut, not a round trip, step 1: A fact check goes through the coordinator
What keeps a scoped tool scoped
A cross-role tool stays narrow only if it is narrow in each place it could widen. As a design checklist:
| Layer | Narrow version |
|---|---|
| Schema | One claim in, one verdict out |
| Description | States the ceiling and the escalation path: simple factual verification only, anything needing several sources goes back to the coordinator |
| Backend | A lookup limited to verification, not general web access |
The description's ceiling is what tells the model when to stop and escalate. A verify_fact with the same retrieval reach as the search tools is the search capability under another name, and the synthesis agent starts doing its own retrieval again.
Replacing Generic Tools with Constrained Alternatives
fetch_url will retrieve anything from anywhere. load_document, which accepts document URLs and validates them, will not. Substituting the second for the first:
- Prevents misuse (the agent cannot fetch arbitrary URLs)
- Makes the tool's purpose clearer (the description is specific, not generic)
- Reduces the risk of unintended side effects (no fetching of non-document resources)
Note that the second benefit feeds selection quality as well as safety: a narrow tool can be described precisely, and precise descriptions are what tool selection runs on. What that amounts to is least privilege applied to tool design: reach is granted to the extent the role needs it and no further.
Reach only as far as the role needs, and no further, step 1: Request: load the quarterly report PDF
The boundary lives in the tool's contract, not in an instruction. Keeping fetch_url and telling the agent not to misuse it is a prompt-level answer to a contract-level problem: the tool still accepts whatever URL the model hands it. For the same reason a constrained tool has to validate before it fetches and reject what fails. Renaming the tool or rewording its description without enforcement only documents an intention, and checking the content type after retrieval means the unwanted request has already been made.
The guide's example is fetch_url. The same substitution applies to any open-ended tool:
| Generic | Constrained | What the constraint buys |
|---|---|---|
fetch_url(url) | load_document(url), which validates document URLs | The agent cannot quietly become a web browser |
run_query(sql) | get_order(order_id), list_orders(customer_id, filters) | No arbitrary SQL; predictable result shapes; authorisation that can be enforced per operation |
call_api(endpoint, body) | One named operation per endpoint | Errors and permissions become specific to each operation |
Role-Specific Tool Scoping in Practice
Here is how tool distribution looks in a well-designed multi-agent research system:
| Agent | Tools (4-5 each) |
|---|---|
| Web Search | search_web, fetch_page, extract_links, save_snippet |
| Document Analysis | extract_metadata, extract_data_points, summarize_content, verify_claim |
| Synthesis | compile_report, verify_fact (scoped), format_citation, assess_coverage |
| Coordinator | Task (spawns subagents; named Agent in current tooling), review_output, request_revision |
Every agent's list stops at what its role requires. Synthesis carries the scoped verify_fact for the trivial cases. The coordinator holds no domain tools whatever — its job is running the workflow, and giving it the means to do the work itself is how coordinators start doing the work itself.
To confirm a distribution is holding, look at which agent made each tool call, not at the final output. A cross-role call raises no error, because the tool works perfectly well for whichever agent holds it, and a synthesis agent that ran its own searches can still produce a good report.
Deep Dive
tool_choice has four types, not three — and each has a default
The exam guide's three headline modes (auto, any, forced) are three of four documented tool_choice types. The Messages API reference defines all four: auto — "The model will automatically decide whether to use tools" (default when tools are provided); any — "The model will use any available tools"; tool — "The model will use the specified tool with tool_choice.name"; and none — "The model will not be allowed to use tools" (default when no tools are provided). none is the one the guide does not list: it's how you force a pure-text turn — a synthesis or proofreading pass, say — even when the request still carries a tools array for later turns.
{ "tool_choice": { "type": "none" } }Sourcesplatform.claude.com › messagesplatform.claude.com › define-toolsfetched 2026-11-19
Forced tool choice is rejected by the newest models
The docs now open the topic with a limit: "Not every model and setting supports forced tool use." Two restrictions are listed.
| Model or setting | What happens with any or tool | What the docs say to use instead |
|---|---|---|
| Claude Fable 5.2, Mythos 5.2, Opus 5.5, Sonnet 5.5, Fable 5.1, Mythos 5.1 | "any and tool return a 400 error" (an invalid_request_error), whatever the thinking settings | auto with strict tool use, or structured outputs; "Prompting still influences which tool auto picks" |
Manual extended thinking (thinking: {type: "enabled"}) on any model | "any and tool are not supported and result in an error" | auto or none |
auto and none work everywhere. Where forcing is accepted, the docs' tip for a guaranteed, well-formed call is to "combine tool_choice: {"type": "any"} with strict tool use to guarantee both that one of your tools is called and that the tool inputs strictly follow your schema."
Sourcesplatform.claude.com › define-toolsplatform.claude.com › errorsfetched 2026-11-19
Forcing the first step, then releasing it
The guide's extract_metadata pattern as a loop. Here TOOLS is the list of tool definitions and run_tools stands for your own function that executes each tool_use block in a response and returns the matching tool_result blocks. The model is one the docs name as accepting forced tool use.
messages = [{"role": "user", "content": "Process this document: ..."}]
choice = {"type": "tool", "name": "extract_metadata"} # first request only
while True:
response = client.messages.create(
model="claude-opus-5", max_tokens=2048,
tools=TOOLS, tool_choice=choice, messages=messages,
)
if response.stop_reason != "tool_use":
break
messages.append({"role": "assistant", "content": response.content})
messages.append({"role": "user", "content": run_tools(response)})
choice = {"type": "auto"} # release the constraintThe invariant is the last line. Without it every request is forced, every response has a stop_reason of tool_use, and the loop never reaches a final answer.
Sourcesplatform.claude.com › define-toolsplatform.claude.com › handle-tool-callsfetched 2026-11-19
Forced selection suppresses commentary, not just tool choice
"When tool_choice is any or tool, the API makes Claude's response start with a tool call. As a result, Claude doesn't emit a natural-language response or explanation before tool_use content blocks, even if you ask it to." Under plain auto, by contrast, "Claude often comments on what it's doing or responds naturally to the user before calling tools" — forced selection removes that entirely. If your pipeline logs or displays Claude's commentary before a forced first step, expect that field to be empty. When the commentary matters, the docs' route is auto with an explicit instruction in the user message to use the tool.
Sourceplatform.claude.com › define-toolsfetched 2026-11-19
Forced tool_choice and thinking
A configuration trap worth knowing cold: with manual extended thinking (thinking: {type: "enabled"}), "any and tool are not supported and result in an error"; only auto and none are compatible. A document-analysis agent that both reasons with manual extended thinking and needs to force extract_metadata as its mandatory first step cannot do both on the same call — the forcing has to happen without manual extended thinking enabled, or not at all.
Note the scope carefully: the restriction is specific to manual extended thinking. "Adaptive thinking itself doesn't block forced tool use". Models with thinking on by default, such as Claude Opus 5 and Claude Haiku 5.5, accept a forced call, but "a forced call skips thinking: the response starts with the tool call and has no thinking block." The reasoning then happens on the auto turns that follow. To have the model think before the call itself, the docs say to use auto with a prompt instruction.
Sourceplatform.claude.com › define-toolsfetched 2026-11-19
disable_parallel_tool_use lives inside tool_choice, not at the top level
"Parallel tool use is on by default." To turn it off you set disable_parallel_tool_use: true, but "It is not a top-level request parameter" — it's a field inside the tool_choice object, and its effect depends on the enclosing type:
tool_choice.type | Effect of disable_parallel_tool_use: true |
|---|---|
auto | At most one tool call per response; Claude can still answer in plain text |
any / tool | Exactly one tool call |
{ "tool_choice": { "type": "any", "disable_parallel_tool_use": true } }The second row applies only on models that accept any and tool; the same page repeats that the newest models listed above do not.
Sourceplatform.claude.com › parallel-tool-usefetched 2026-11-19
Changing tool_choice between turns has a prompt-caching cost
A coordinator that forces extract_metadata on turn one, then switches to auto for later turns (exactly the pattern this lesson recommends), pays a caching price for the switch: "changes to the tool_choice parameter will invalidate cached message blocks. Tool definitions and system prompts remain cached, but message content must be reprocessed." Worth knowing when estimating latency/cost for a workflow that toggles forced-then-auto tool_choice on every run.
Sourceplatform.claude.com › define-toolsfetched 2026-11-19
strict: true validates the input that tool_choice cannot
tool_choice decides whether and which tool is called. The shape of the arguments is a separate guarantee: "Setting strict: true on a tool definition guarantees Claude's tool inputs match your JSON Schema". Without it, the docs warn, "Claude might return incompatible types ("2" instead of 2) or omit required fields". The two are complementary, which is why a question about malformed tool arguments is not answered by changing tool_choice.
Sourceplatform.claude.com › strict-tool-usefetched 2026-11-19
Scoping a subagent's tools in the Agent SDK
In the Claude Agent SDK each subagent is an AgentDefinition, and its tools field is the distribution lever: an "Array of allowed tool names. If omitted, inherits every tool available to subagents". Omitting it is therefore the every-agent-gets-everything failure by default.
options = ClaudeAgentOptions(
allowed_tools=["Agent"],
agents={
"doc-analysis": AgentDefinition(
description="Analyses the documents it is given.",
prompt="You analyse documents and report findings.",
tools=["Read", "Grep", "Glob"],
),
},
)"A tool you leave out isn't in the subagent's session at all: Claude works without it, with no permission prompt or error." That is why scoping by tool set is a hard boundary rather than advice. The coordinator's spawning tool appears as Agent in current releases; the exam guide calls it Task, the name used "Before Claude Code v2.1.63".
Sourcecode.claude.com › subagentsfetched 2026-11-19
Bloated tool sets are a named failure mode in Anthropic's context-engineering guidance
The 4-5-tools-per-agent guideline isn't just a selection-accuracy heuristic — Anthropic's context-engineering guidance names it directly as a top failure mode: "One of the most common failure modes we see is bloated tool sets that cover too much functionality or lead to ambiguous decision points about which tool to use." Framed this way, every extra overlapping tool costs two things at once — more decision complexity and more context budget spent on descriptions the agent will rarely use. That reframes "scope tools to the agent's role" as a context-engineering discipline, not only a routing-accuracy one.
Sourceanthropic.com › effective-context-engineering-for-ai-agentsfetched 2026-11-19
Quick Reference
| Fact | Value |
|---|---|
| Two levers | Distribution decides which tools an agent has (persists); tool_choice decides whether a tool must be called (one request) |
tool_choice: auto | Model decides whether to call a tool or respond in text; default when tools are provided |
tool_choice: any | Model must call some tool, but chooses which |
tool_choice: tool (forced) | {"type": "tool", "name": "…"} — model must call the named tool |
tool_choice: none | Model may not call any tool; default when no tools are provided |
Scope of tool_choice | One request; force the first call, then release to auto |
| Several schemas, document type unknown | any |
| One known schema, or a mandatory first step | Forced selection |
Forced (any/tool) side effect | Response starts with the tool call — no natural-language text before tool_use, even if asked |
| Extended thinking compatibility | Manual extended thinking only works with auto/none; any/tool error out |
| Newest models (current product) | Fable 5.2, Mythos 5.2, Opus 5.5, Sonnet 5.5, Fable 5.1, Mythos 5.1 return a 400 error for any/tool; exam answer unchanged |
disable_parallel_tool_use | Lives inside tool_choice, not top-level |
…with auto | At most one tool call (or none) |
…with any/tool | Exactly one tool call |
Effect of changing tool_choice | Invalidates cached message blocks; tool definitions/system prompt stay cached |
| Argument validation | strict: true on the tool definition, not tool_choice |
| Session-wide ordering rule | A hook, not tool_choice |
| Optimal tools per agent | 4-5, scoped to role (the guide's figure, against 18) |
| Bloated tool sets | Named Anthropic failure mode: ambiguous decision points from overlapping functionality |
| Scoped cross-role tool | Constrained capability given directly to an agent for its high-frequency simple case; complex cases still route through the coordinator |
| Constrained replacement | fetch_url becomes load_document, which validates before fetching and rejects non-documents |
Agent SDK subagent tools | Omitted means the subagent inherits every tool available to subagents |
Exam Traps
More wrong answers, and why each fails
| Tempting answer | Why it fails | Choose instead |
|---|---|---|
| Split the tool pool evenly so every agent holds the same number | It respects the count and ignores the role; distributing by number is how a search tool lands on a synthesis agent | Assign by role, 4-5 each, with no tool in two roles unless deliberately scoped |
Set any and list extract_metadata first in the tools array to make it run first | any guarantees a call, not which one, and position in the array does not decide selection | Forced selection on the first request |
| Treat a correct final report, or a run with no tool errors, as proof the scoping works | A cross-role call succeeds silently and a good report can hide duplicated searches | Check which agent made each tool call |
| Run all extraction tools on every document and keep whichever output validates | Several calls and several schemas' worth of context where one call with the right setting does the job | any, one call |
How This Is Tested
| Stem signal | Answer | Wrong-answer pattern beside it |
|---|---|---|
| One agent holds 18 tools and selection has degraded | Scope tool sets per role, 4-5 each | Rewrite the descriptions again; add few-shot examples |
| 85% simple and 15% complex verifications, 2-3 round trips, 40% more latency | Scoped cross-role tool for the common case, coordinator for the rest | Give the agent the full capability; batch the requests; cache speculatively |
extract_metadata must run before the enrichment tools | Forced tool_choice on the first request, then auto | any; an ordering instruction in the prompt; forcing every turn |
| A structured result is required and the document type is unknown | any | Force the most common schema; auto with an instruction |
| The model sometimes replies conversationally instead of calling the extraction tool | any (or forced selection when one tool applies) | A more emphatic system prompt |
| A subagent fetches things outside its role with a general-purpose tool | Replace it with a constrained tool that validates its input | Keep the tool and add a rule to the prompt; log the calls |
| A rule must hold on every turn of a session | A hook | tool_choice, which lasts one request |
Official sample question 9, option by option
The stem: the synthesis agent "frequently needs to verify specific claims while combining findings". Each verification returns control to the coordinator, which invokes the web search agent and re-invokes synthesis. "This adds 2-3 round trips per task and increases latency by 40%." The evaluation shows "85% of these verifications are simple fact-checks (dates, names, statistics) while 15% require deeper investigation." The question asks for "the most effective approach to reduce overhead while maintaining system reliability".
| Option | Verdict | The official explanation |
|---|---|---|
| A. "Give the synthesis agent a scoped verify_fact tool for simple lookups, while complex verifications continue delegating to the web search agent through the coordinator." | Correct | It "applies the principle of least privilege by giving the synthesis agent only what it needs for the 85% common case (simple fact verification) while preserving the existing coordination pattern for complex cases." |
| B. "Have the synthesis agent accumulate all verification needs and return them as a batch to the coordinator at the end of its pass, which then sends them all to the web search agent at once." | Wrong | The "batching approach creates blocking dependencies since synthesis steps may depend on earlier verified facts." |
| C. "Give the synthesis agent access to all web search tools so it can handle any verification need directly without round-trips through the coordinator." | Wrong | It "over-provisions the synthesis agent, violating separation of concerns." |
| D. "Have the web search agent proactively cache extra context around each source during initial research, anticipating what the synthesis agent might need to verify." | Wrong | It "relies on speculative caching that cannot reliably predict what the synthesis agent will need to verify." |
Two things make A the answer. The numbers in the stem identify a frequent simple case and a rare hard one, so the fix should treat them differently. And "maintaining system reliability" rules out C, which removes the latency by recreating the cross-role misuse that scoping exists to prevent.
Practice Scenario
Your synthesis subagent was given search_web alongside its report-writing tools so it could fill gaps without waiting on a delegation. Traces now show it running its own searches on topics the web-search subagent already covered, duplicating roughly a fifth of the run's retrieval work and pushing synthesis context to its limit. What change would most effectively address this?
Practice Questions
Exam simulator
Question 1 of 13
Scenario · Customer Support Resolution Agent
To save a future sprint, your team gave the support agent internal admin tools alongside its usual four, including adjust_credit_limit and merge_accounts, "in case they're ever needed." This month the agent raised three customers' credit limits while resolving billing disputes, which isn't part of support's role. Which approach should you take?
Sources
- Claude Certified Architect Foundations Exam Guide — Domain 2, Task Statement 2.3 — Anthropic
- Tool use with Claude — Anthropic
- Agent SDK overview — Anthropic
- Subagents in the SDK — Anthropic
- Messages API reference — Anthropic
- Define tools — Anthropic API Documentation — Anthropic
- Handle tool calls — Anthropic
- Strict tool use — Anthropic
- Parallel tool use — Anthropic API Documentation — Anthropic
- Claude API errors — Forced tool use not supported — Anthropic
- Effective context engineering for AI agents — Anthropic — Anthropic