Tool Choice ⚠ verify
Definition
The tool_choice parameter controls whether and which tool Claude must use on a given turn.
Key points
- Four options:
{"type": "auto"}— Claude decides. Default whentoolsare provided.{"type": "any"}— must use one of the provided tools (not a specific one).{"type": "tool", "name": "..."}— forces a specific named tool.{"type": "none"}— no tools. Default when notoolsprovided.
disable_parallel_tool_use: truecan be added to any value → at most one tool call per response (default: multiple allowed).- With
anyortool, the API prefills the assistant message → no natural-language preamble beforetool_useblocks. - Extended thinking incompatibility:
anyandtoolare NOT supported with extended thinking (error) — onlyautoandnonework. See Adaptive Thinking and Effort. - Claude Mythos Preview does not support forced tool use (
any/tool→ 400). ⚠ verify (2026-07-08). - Changing
tool_choiceinvalidates cached message blocks (tools + system stay cached). See Prompt Caching.
Why it matters for the exam
- Tests the two defaults (auto with tools, none without) and the extended-thinking incompatibility.
- Cache-invalidation nuance appears in context/caching questions.
Common gotchas
any≠ forcing a specific tool; usetool+namefor that.- Pairing
any/toolwith extended thinking errors — a frequent trap. - Changing
tool_choicebusts the message cache but not tools/system.
See also
Sources
Referenced by
Practice questions optional · AI
Generate fresh practice questions about this concept with AI. These are not vault-verified.