Study notes · 3.6% of the exam

2.3 Distribute tools appropriately across agents and configure tool choice

Give each agent only the tools its role needs, add narrowly scoped cross-role tools for frequent needs, and use tool_choice to guarantee that a tool (or a specific tool) is called.

Key points

  1. 1

    Too many tools degrade selection: an agent with 18 tools makes more mistakes than one with 4-5. Decision complexity, not model capacity, is the problem, so "use a bigger model" is a non-answer.

  2. 2

    Agents holding tools outside their specialisation tend to misuse them (a synthesis agent running web searches). Remove the tool rather than instructing the agent not to use it; a prompt rule is probabilistic, a missing tool is deterministic.

  3. 3

    Scoped tool access: restrict each subagent's tool set to its role. Replace generic tools with constrained alternatives, e.g. fetch_url becomes load_document that validates the URL is an assigned document source.

  4. 4

    Scoped cross-role tools: when one agent needs another role's capability frequently (85% simple fact checks, 85% symbol lookups), give it a narrow read-only tool for that case (verify_fact, find_symbol_definition) and keep routing complex cases through the coordinator. Do not hand over the other agent's full tool set, batch lookups to the end, or speculatively pre-load data.

  5. 5

    tool_choice options: auto (default with tools; model may answer with text or call a tool), any (must call one of the provided tools, model chooses which), tool with a name (must call that specific tool), and none (no tool calls).

  6. 6

    Use any when several tools are valid outcomes but a text-only reply is not (e.g. record_invoice or flag_unreadable). Use tool to force a prerequisite such as extract_metadata on the first request, then send follow-up turns with auto so enrichment tools can run; leaving the forced choice on every turn loops on the same tool.

  7. 7

    When tool_choice is any or tool, the API prefills the assistant message, so the model emits no natural-language text before the tool_use block even if asked. To capture a rationale while keeping the guarantee, add a rationale field to the tool's input schema; switching to auto loses the guarantee.

  8. 8

    Combine forced tool use with strict: true on the tool definition when inputs must match the schema exactly. Note: current docs say some newer models reject any/tool with a 400 and recommend auto plus strict tools or structured outputs; the exam tests the guide's framing, so answer in terms of the option semantics above.

  9. 9

    Changing tool_choice between requests invalidates cached message blocks under prompt caching; tool definitions and the system prompt stay cached.

  10. 10

    In the Agent SDK, restrict tools per agent with allowedTools / disallowedTools and per-subagent tools lists; MCP tools are named mcp__<server>__<tool> and mcp__<server>__* allows a whole server.

Test yourself on 2.3 Distribute tools appropriately across agents and configure tool choice

Ten questions, with the answer and explanation after each one.