CertSafari
    Anthropic Claude Certified Architect – Foundations (CCAR-F)· Lessons

    Domain 2 · Lesson 10/30

    Scoping tools per agent and configuring tool_choice

    Distribute tools appropriately across agents and configure tool choice

    16 min read
    3.6% of exam
    8 sources
    Published 20 Oct 2026
    Docs as of 14 Oct 2026

    What you will be able to do

    • Explain why giving an agent 18 tools instead of 4–5 makes its tool selection less reliable
    • Restrict each subagent's tool set to its role using tools and disallowedTools
    • Replace a generic tool with a constrained one, and decide when a role gets a narrow cross-role tool and when the case goes through the coordinator
    • Choose between tool_choice auto, any, a forced tool and none for a given requirement
    • Force a specific tool first and handle the later steps in follow-up turns, and recognise when forced tool use is rejected

    Key concept

    Scoped tool access — Each agent gets only the small set of tools its role needs, plus at most a narrow tool for a frequent need that belongs to another role. A smaller candidate set makes tool selection more reliable and keeps agents from reaching for tools outside their job.

    1.Why fewer tools per agent means better selection

    Every tool an agent holds is one more option it has to rule out on every turn. If an agent has 4 or 5 tools, picking the right one is a small choice between clearly different options. If it has 18, the same request has to be weighed against many more candidates, and several of them will look partly relevant. Selection reliability falls as the candidate set grows because the decision itself gets more complex. The model hasn't become less capable. It is simply being asked to tell apart more options that look alike.

    Overlap makes the problem worse. When two tools could both plausibly handle a request, the agent has to guess between them, and a long tool list is where overlapping tools accumulate. Anthropic's tool-design guidance says this directly: "Too many tools or overlapping tools can also distract agents from pursuing efficient strategies." The fix is structural. Split one 20-tool generalist into specialised agents, each choosing among about four tools for its stage, so that every selection is made from a much smaller set. The fix is not fewer API calls, a smaller context window or cached results. It is fewer candidates per decision.

    Use 4–5 tools per role as the working rule. The Agent SDK's tool-search page sets the point where accuracy visibly degrades much higher, at 30–50 tools loaded at once. Don't wait for that point before scoping. An agent with 18 tools is already making harder choices than it needs to.

    Checkpoint 1 of 8· Check yourself

    A research agent has grown from 5 tools to 18, and several of them now partly overlap. It increasingly calls the wrong tool for a request. Which change most directly fixes this?

    Checkpoint 2 of 8· Exam question

    A single generalist agent handling an entire content pipeline (research, outline, draft, edit, publish) has 20 tools and shows declining tool-selection accuracy as more tools were added over time. The architect proposes splitting it into five specialized subagents, each scoped to roughly 4 tools for its stage, coordinated by a lightweight orchestrator. What is the main reliability benefit of this redesign, based on the relationship between tool count and selection accuracy?

    Sources123

    2.Scoping each subagent's tools to its role

    Agents misuse tools that fall outside their specialisation. Picture a synthesis agent that is supposed to combine findings it has been given. If it also holds a web search tool, it may start running its own searches, which repeats the research agent's work and brings in unvetted sources. A QA agent that holds a deploy tool may eventually call it. Writing role instructions into the prompt doesn't fully stop this, because the tool is still there to choose. The dependable fix is to remove the tool, so that misuse can't happen in the first place.

    Subagent definitions make this a configuration setting. In the Agent SDK, a subagent's tools array lists exactly what it may call. If you leave tools out, the subagent inherits every tool available to subagents, so a subagent with no tools list effectively has the full union. The disallowedTools field works the other way round: it removes named tools from the inherited or specified set. It also accepts MCP patterns, so mcp__github removes every tool from that server. How subagents are spawned and how they receive context is covered in subagent configuration.

    A Claude Code subagent whose role is research, limited to four toolsyaml
    ---
    name: safe-researcher
    description: Research agent with restricted capabilities
    tools: Read, Grep, Glob, Bash
    ---

    Scoping decides which tools an agent has. It does not decide whether the agent should call a tool on a given turn. Once each subagent has a role-sized tool set, keep tool_choice at auto so the agent still decides each turn whether to act or simply answer. If you give everyone the full tool set and then switch every subagent to any or none, you are working on the wrong axis: the deploy tool is still available to the QA agent, and you have also taken away the agent's ability to choose between acting and responding.

    Checkpoint 3 of 8· Check yourself

    In a multi-agent pipeline, every subagent shares the same tool set. The synthesis agent keeps running its own web searches, and the QA agent once called the deploy tool. What is the most dependable fix?

    Checkpoint 4 of 8· Fill the gap

    This research subagent should be able to call exactly these four tools and nothing else. Which field completes the definition?

    ---
    name: safe-researcher
    description: Research agent with restricted capabilities
     ? : Read, Grep, Glob, Bash
    ---

    Sources456

    3.Constrained tools and narrow cross-role tools

    A generic tool gives an agent more power than its role needs. Take fetch_url: it can fetch any URL at all. A document-processing agent only needs to load documents, so give it a load_document tool that checks the URL really points to a document before fetching it. The rule now lives inside the tool, where the model can't argue its way around it. This follows Anthropic's broader tool-design advice to build tools for specific workflows rather than wrapping a raw capability. For example, a contacts agent gets search_contacts instead of list_contacts.

    The same constraint can be applied to a built-in tool. A Claude Code subagent named db-reader has only Bash, and a PreToolUse hook script scoped to that subagent rejects any SQL write command with the message "Blocked: Only SELECT queries are allowed". As far as the agent can tell, it has a read-only query tool. The hook mechanics are covered in tool call interception with hooks.

    Strict scoping sometimes clashes with a real need. A synthesis agent checks facts constantly while it writes. Sending every one of those checks through the coordinator to the research agent adds a round trip each time. In that case, give the synthesis agent one narrow cross-role tool, verify_fact, that does that single job. It still has no general search tool. Anything beyond a quick check, such as a claim that needs new research or a conflict between sources, still goes back to the coordinator, which assigns it to the specialist. Frequent, narrow needs get a scoped tool. Complex or infrequent needs go through the coordinator.

    A coordinator that can spawn only two named subagents, alongside two direct toolsyaml
    ---
    name: coordinator
    description: Coordinates work across specialized agents
    tools: Agent(worker, researcher), Read, Bash
    ---

    Checkpoint 5 of 8· Check yourself

    Your document-processing agent holds a generic fetch_url tool. It has started pulling arbitrary web pages that are not documents, even though its prompt says to load only documents. What is the most dependable fix?

    Sources25

    4.What auto, any, a forced tool and none guarantee

    Tool scoping controls which tools an agent can see. tool_choice controls whether the model has to call one. It is a field on each request and has four settings. Under the default, {"type": "auto"}, Claude decides on each turn whether to call a tool or answer directly. You can steer that decision with the system prompt, for example "Always call a tool first before responding." Steering is not a guarantee, though. To require a tool call, set tool_choice.

    The four tool_choice settings and what each one guarantees
    SettingGuaranteeWhen it fits
    {"type": "auto"}None: Claude decides whether to call a tool (default when tools are provided)Agents that must decide between acting and replying
    {"type": "any"}Some tool is called, but Claude picks whichEvery turn must be a tool call, e.g. an SMS bot that can only reply via send_text_to_user
    {"type": "tool", "name": "..."}That named tool is calledOne specific call must happen on this turn
    {"type": "none"}No tool is called (default when no tools are provided)A turn that must be text only

    any is the right setting when a text reply would be a failure. Anthropic's tool-choice cookbook builds an SMS assistant whose only ways to act are send_text_to_user and get_customer_info. With any, even a gibberish message gets a tool call: the bot texts back asking the user to rephrase. That is all any promises. It guarantees that some tool is called, not which one, so it can't enforce an order. none goes the other way and blocks tool calls entirely. Setting it on a subagent leaves that agent unable to act at all.

    Checkpoint 6 of 8· Match them up

    Match each tool_choice setting to the situation it fits. Pick the setting whose guarantee is exactly what that situation needs.

    Tap a term, then the definition that fits it.

    Checkpoint 7 of 8· Exam question

    A coordinator agent delegates tasks to a research agent, a coding agent, and a QA agent. Currently, every subagent is configured with the full union of all tools used anywhere in the pipeline, so each has around 15 tools available, and each agent's tool choice is left at {"type": "auto"} in every turn. The team reports agents occasionally reaching for tools clearly outside their remit, like the QA agent invoking a deploy tool. What combination of changes best addresses this while preserving each agent's ability to decide when to act versus respond?

    Sources167

    5.Forcing the first call, then letting the agent choose

    Only a forced tool guarantees order. When the enrichment tools (add_tags, link_related, generate_summary) need fields that only extract_metadata produces, a model under auto will sometimes call an enrichment tool first and make up values for those fields. Better descriptions make that less likely but don't rule it out. Instead, send the first request with {"type": "tool", "name": "extract_metadata"}. Return its result, then send the follow-up turns with auto or any so the model chooses among the enrichment tools now that it has real metadata. In the cookbook, a forced print_sentiment_scores call goes through even for a tweet built to tempt Claude into using the calculator.

    Forcing a named tool: only the tool_choice line differs from a normal tool-use requestpython
    response = client.messages.create(
        model="claude-opus-5",
        max_tokens=1024,
        tools=tools,
        tool_choice={"type": "tool", "name": "get_weather"},
        messages=[{"role": "user", "content": "What's the weather like in San Francisco?"}],
    )

    Forcing has costs, and some configurations reject it outright. With manual extended thinking (thinking: {type: "enabled"}), both any and a forced tool cause an error, so use auto or none there. Claude Opus 5.5, Sonnet 5.5, Fable 5.1 and Mythos 5.1 return a 400 for any and tool whatever the thinking settings. On those models, use auto with strict tool use to get schema-valid inputs, or use structured outputs when you need a fixed JSON shape. Models with adaptive thinking, such as Claude Opus 5, do accept a forced call, but the response starts straight with the tool call and has no thinking block. Parallel calls are controlled by a separate setting: disable_parallel_tool_use: true goes inside the tool_choice object, not at the top level of the request.

    Where any and forced tool use fail, and what to use instead
    Model or settingany / toolUse instead
    Manual extended thinking (thinking: {type: "enabled"})Errorauto or none
    Claude Opus 5.5, Sonnet 5.5, Fable 5.1, Mythos 5.1400 errorauto with strict tool use, or structured outputs
    Adaptive thinking models such as Claude Opus 5 and Claude Haiku 5.5Accepted; the forced call skips thinkingForced tool, accepting that no thinking block is produced

    Checkpoint 8 of 8· Fill the gap

    This request must make Claude call get_weather on this turn, not just some tool and not a text reply. Which value completes the tool_choice type?

    response = client.messages.create(
        model="claude-opus-5",
        max_tokens=1024,
        tools=tools,
        tool_choice={"type": " ? ", "name": "get_weather"},
        messages=[{"role": "user", "content": "What's the weather like in San Francisco?"}],
    )

    Sources178

    Sources

    (8)

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “Fewer, more capable tools reduce selection ambiguity and make your tool surface easier for Claude to navigate.”
      ↩︎ Why fewer tools per agent means better selection
      “auto allows Claude to determine whether to call any provided tools or not.”
      ↩︎ What auto, any, a forced tool and none guarantee
      “none prevents Claude from using any tools.”
      ↩︎ What auto, any, a forced tool and none guarantee
      “tool forces Claude to always use a particular tool.”
      ↩︎ Forcing the first call, then letting the agent choose
      “You can do this by specifying the tool in the tool_choice field of the request.”
      ↩︎ Forcing the first call, then letting the agent choose
      “any and tool are not supported and result in an error”
      ↩︎ Forcing the first call, then letting the agent choose
      “auto with strict tool use to guarantee schema-valid tool inputs, or structured outputs when you need a response in a fixed JSON shape”
      ↩︎ Forcing the first call, then letting the agent choose
      “Fewer, more capable tools reduce selection ambiguity and make your tool surface easier for Claude to navigate.”
      ↩︎ Key concept
      “any tells Claude that it must use one of the provided tools, but doesn't force a particular tool.”
      ↩︎ Exam trap 1
      “any and tool return a 400 error”
      ↩︎ Exam trap 3
      “a forced call skips thinking: the response starts with the tool call and has no thinking block”
      ↩︎ Exam trap 4
      “any tells Claude that it must use one of the provided tools, but doesn't force a particular tool.”
      ↩︎ Prediction
    2. 2.
      “Too many tools or overlapping tools can also distract agents from pursuing efficient strategies.”
      ↩︎ Why fewer tools per agent means better selection
      “When tools overlap in function or have a vague purpose, agents can get confused about which ones to use.”
      ↩︎ Why fewer tools per agent means better selection
      “In the address book case, you might choose to implement a search_contacts or message_contact tool instead of a list_contacts tool.”
      ↩︎ Constrained tools and narrow cross-role tools
      “We recommend building a few thoughtful tools targeting specific high-impact workflows”
      ↩︎ Constrained tools and narrow cross-role tools
    3. 3.
      “Tool selection accuracy degrades with more than 30-50 tools loaded at once.”
      ↩︎ Why fewer tools per agent means better selection
    4. 4.
      “A doc-reviewer subagent might only have access to Read and Grep tools, ensuring it can analyze but never accidentally modify your documentation files.”
      ↩︎ Scoping each subagent's tools to its role
      “mcp__server or mcp__server__* removes every tool from that server”
      ↩︎ Scoping each subagent's tools to its role
      “Tool restrictions: subagents can be limited to specific tools, reducing the risk of unintended actions.”
      ↩︎ Exam trap 2
      “Tool restrictions: subagents can be limited to specific tools, reducing the risk of unintended actions.”
      ↩︎ Checkpoint
    5. 5.
      “Inherits every tool available to subagents if omitted.”
      ↩︎ Scoping each subagent's tools to its role
      “Tools to deny, removed from inherited or specified list.”
      ↩︎ Scoping each subagent's tools to its role
      “Blocked: Only SELECT queries are allowed”
      ↩︎ Constrained tools and narrow cross-role tools
      “tools: Agent(worker, researcher), Read, Bash”
      ↩︎ Constrained tools and narrow cross-role tools
    6. 6.
      “Claude determines on each turn whether to call a tool or respond directly.”
      ↩︎ Scoping each subagent's tools to its role
      “To require a tool call rather than rely on prompting, set tool_choice.”
      ↩︎ What auto, any, a forced tool and none guarantee
    7. 7.
      “The idea is to create a chatbot that always calls one of these tools and never responds with a non-tool response.”
      ↩︎ What auto, any, a forced tool and none guarantee
      “it still always calls the print_sentiment_scores tool”
      ↩︎ Forcing the first call, then letting the agent choose
    8. 8.
      “set disable_parallel_tool_use: true inside the tool_choice object. It is not a top-level request parameter.”
      ↩︎ Forcing the first call, then letting the agent choose

    Spotted a mistake, or was something unclear? Tell us.