Tool Use & Function Calling

What is the difference between tool_choice auto and any?

QUICK ANSWER

tool_choice 'auto' allows Claude to choose whether to write a text response or execute a tool, whereas 'any' forces Claude to call at least one tool before responding.

Options Comparison

  • auto: Best for standard user chat. The assistant will answer questions using text, and only call tools when external database information is requested.
  • any: Best for automated agents. Ensures the output starts a tool action, preventing the model from writing conversational chat.
Verified against: Anthropic Tool Choice Spec