Claude · Schema

ToolChoice

How the model should use the provided tools.

Artificial IntelligenceChatbotsConversational AIGenerative AILarge Language ModelsMachine-LearningNatural Language Processing

Properties

Name Type Description
type string The type of tool choice. "auto" lets the model decide, "any" forces tool use, "tool" forces a specific tool, "none" disables tools.
name string The name of the tool to use. Required when type is "tool".
disable_parallel_tool_use boolean Whether to disable parallel tool use.
View JSON Schema on GitHub

JSON Schema

claude-messages-tool-choice-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "ToolChoice",
  "type": "object",
  "description": "How the model should use the provided tools.",
  "properties": {
    "type": {
      "type": "string",
      "description": "The type of tool choice. \"auto\" lets the model decide, \"any\" forces tool use, \"tool\" forces a specific tool, \"none\" disables tools."
    },
    "name": {
      "type": "string",
      "description": "The name of the tool to use. Required when type is \"tool\"."
    },
    "disable_parallel_tool_use": {
      "type": "boolean",
      "description": "Whether to disable parallel tool use."
    }
  }
}