tool_choiceTask Statement 2.3 — least privilege for agents, and controlling whether/which tool fires.
More tools ≠ more capable. Past a handful, extra tools degrade selection. Give each agent the smallest toolset for its role, and use tool_choice to control the model's hand when you must.
Giving an agent 18 tools instead of the 4–5 it needs increases decision complexity and reliability drops. Agents with tools outside their specialization tend to misuse them — a synthesis agent handed web-search tools will start doing ad-hoc searches instead of synthesizing.
verify_fact for the synthesis agent for the common 85% of simple checks, while complex verification still routes through the coordinator.Replace a broad tool with a constrained one: swap fetch_url (fetches anything) for load_document (validates that the URL is a document). Narrower contract, fewer misuses.
tool_choice — three modes| Value | Behavior | Use when |
|---|---|---|
"auto" | Model may call a tool or answer in text | Normal agentic operation |
"any" | Model must call some tool (its choice) | You need a tool call, not chit-chat — e.g., guarantee structured output when the doc type is unknown but must be extracted |
forced {"type":"tool","name":"X"} | Model must call tool X | A specific tool must run first — e.g., force extract_metadata before enrichment steps, then continue in follow-up turns |
tool_choice: "any". "This one tool must run first" → forced tool selection. Note forced selection ensures the first call; subsequent steps happen in later turns.tool_choice: "auto" so the model decides freely each turntool_choice: "any" so it must call some tool"any" guarantees a tool call while allowing the model to choose which schema — right when the document type is unknown. "auto" permits text; forcing one named tool is wrong when the type varies; token limits are unrelated."any". Specific tool must run first → forced selection.