Study FAQ
How do I choose tool_choice and require a first tool before later Claude workflow stages?
Also asked as 2
- When should a Claude Messages request use auto, any, a named tool, or none?
- How can I require an initial tool request without letting later stages bypass its validated result?
Answer
Use tool_choice to control what Claude may request in one response, and enforce stage prerequisites in application code. Selection policy does not execute or authorize an operation.
| Request-level value | Selection behavior |
|---|---|
{"type":"auto"} |
Claude may request an available tool or answer without one. |
{"type":"any"} |
Require a request to an available tool, without naming one. |
{"type":"tool","name":"extract_metadata"} |
Require that exposed tool. |
{"type":"none"} |
Prevent tool requests for this response. |
These values belong beside the request's messages and tools, rather than inside a user message. Verify the selected model and thinking configuration. Forced any and named-tool choices are unsupported with manual extended thinking, and some current models reject them independently of thinking settings. Adaptive thinking alone does not establish forced-choice support. If forcing is unavailable, use a supported design whose application refuses to advance without the required result; auto leaves the request optional.
For metadata-before-enrichment, initially expose the approved extraction capability. Inspect the actual call, authorize and execute it, return its correlated result, and validate the document identity and required metadata. Only then advance to a request with appropriate enrichment tools and selection policy. If extraction fails or identifies the wrong document, retain the failure and stop that dependent stage.
After a valid prerequisite, leaving the extractor forced can cause repeated extraction. Deliberately choose the next stage's tool set and policy. disable_parallel_tool_use, where supported, limits calls within a response; it is not a scheduler, global lock, or proof that a prerequisite completed. Keep service authorization and shared-state coordination at the executor.
Full explanation
Distribute tools appropriately across agents and configure tool choice
Learning material · CCAR-F
Read the full explanation