Tool distribution and tool choice
What this covers
- Scope each agent to the tools its role needs
- Recognize that too many tools degrades selection
- Use
tool_choice: "any"to guarantee that a tool is called - Force a tool by name to guarantee which tool runs, which is what an ordering requirement needs
- Constrain a general tool into a narrower one rather than granting or withholding the general form
Key terms
- Tool
- A function an agent can call to read information or take an allowed action.
Tool count is a reliability factor
Give an agent eighteen tools where five would do and selection reliability degrades. Every additional tool makes the selection decision more complex.
Each additional tool gives the model another possible choice. When several tools have similar purposes, adding more can increase selection errors.
Agents misuse tools outside their specialization
An agent may use any tool it receives, even when the tool does not suit its role. For example, a synthesis agent with a web-search tool may start new searches instead of combining the research it was given.
Scope each agent's tool set to its role. The restriction is not bureaucratic; it prevents a whole class of misuse.
Remove tools a role should not use, but keep the tools it needs to finish its work. For example, a triage agent may need both a classification tool and a way to route a contact it cannot classify. The goal is the right set of tools, not the smallest possible set.
Narrow a tool when the role still needs it
Sometimes a role genuinely needs a capability but not in its general form. Replace a generic fetch_url with load_document, which validates that the URL is a document. Same need served, far less room for misuse.
For a common need shared across roles, provide one narrowly scoped tool. For example, a synthesis agent might receive verify_fact. Send more complex cases to the coordinator instead of giving every agent more tools.
tool_choice
auto— may call a tool or answer in text.any— must call a tool, chooses which. Use it to guarantee the model acts rather than returning conversational text.- Forced,
{"type": "tool", "name": "..."}— a specific tool must be called. Use it to guarantee ordering, such as runningextract_metadatabefore any enrichment tool, then continuing in follow-up turns.
The distinction to hold: any guarantees that a tool is used. Forcing guarantees which.
In some card games you have to play a card every turn, even when passing would serve you better, so a player with nothing useful still puts something down. Requiring a move is not the same as requiring a particular one.
The three values as they are actually written:
{"type": "auto"}
{"type": "any"}
{"type": "tool", "name": "extract_metadata"}The third differs from the second by one field, and that one field is the entire difference between "act" and "run this".
There's a cost to any worth knowing. It forbids a text-only reply, so an agent with the work finished has no way to say so and no way to ask you a clarifying question; it calls something instead. Set it on the turn that needs action, then hand the turn back.
scoped tool accesstool_choiceconstrained tools
Field note — common misconceptions
- MythThat more available tools makes an agent more capable
- ActuallyEach added tool is another option in the decision, and selection reliability degrades.
- MythThat an agent will decline to use a tool outside its specialization
- ActuallyA synthesis agent holding a web-search tool will run web searches, so scope tools by role.
- MythThat
anyand forced selection do the same thing - Actually
anyguarantees that a tool is used; a forced name guarantees which one runs.
Guided review
Review this lesson as a study deck
Review the lesson's main ideas in five guided slides, then test yourself with three flashcards.
Open Task 2.3 study deckCross-domain reasoning
Connect this idea
Tool access sets an authority boundary
Hooks, tool descriptions, access limits, MCP configuration, and escalation rules decide what an agent may do and when another person or system must decide.
Applied practice
Practice this lesson in a lab
Use a related lab to create a decision, implementation or diagram, evidence record, and review.
- Lab 2 · Coordinator and specialist agents
Coordinate three bounded specialists without losing provenance or hiding a coverage gap.
- Lab 3 · Deterministic prerequisite and human handoff
Enforce safety policy outside the prompt and produce a handoff another person can act on.
- Lab 5 · Design and test an MCP server
Design narrow MCP capabilities for a synthetic note catalog and test every trust boundary.