Schemas, parallel execution, result handling, and parameters for Claude function calling.
Claude tool schemas follow the JSON Schema Draft 4 specification. Place descriptions on all properties to help Claude select th...
When Claude decides to call multiple tools in a single turn, the API returns a message block containing multiple content blocks...
Return tool results in a user message block containing a list of content blocks of type 'tool_result'. Each block must specify ...
Yes. If Claude needs to fetch multiple independent data points, it will return multiple tool_use blocks referencing the same to...
Force Claude to use a specific tool by setting the request parameter 'tool_choice' to type 'tool' and providing the name of the...
tool_choice governs how Claude selects tools. Use 'auto' to let Claude decide whether to use tools, 'any' to force Claude to se...
To report a tool execution failure to Claude, return a user message block with the parameter 'is_error' set to true. This tells...
Claude officially supports up to 100 tools per single API request. However, including many tools increases system prompt token ...
Define nested structures by nesting object properties inside properties in your tool definition, matching the JSON Schema Draft...
Tool schemas are serialized into XML instructions and prepended to the system prompt, counting towards your input token billing...
In stream responses, listen for events of type 'content_block_start' with content type 'tool_use'. Collect arguments from 'cont...
Provide detailed descriptions for tool parameters, use enum lists for allowed values, and instruct the model in your system pro...
No. The system prompt guidelines and rules remain active and guide Claude's behavior even when the model decides to use tools.
Set the temperature to 0.0 when using tools. This ensures arguments are generated reliably and matches the target schemas witho...
tool_choice 'auto' allows Claude to choose whether to write a text response or execute a tool, whereas 'any' forces Claude to c...
Claude tool schemas follow the JSON Schema Draft 4 specification. Place descriptions on all properties to help Claude select the correct tool and generate matching parameters.
When Claude decides to call multiple tools in a single turn, the API returns a message block containing multiple content blocks of type 'tool_use'. Iterate through the list, execute them in parallel, and return corresponding tool result blocks.
Return tool results in a user message block containing a list of content blocks of type 'tool_result'. Each block must specify the matching 'tool_use_id' to bind the result to the initial request.
Yes. If Claude needs to fetch multiple independent data points, it will return multiple tool_use blocks referencing the same tool name but with distinct arguments and unique tool_use_ids.
Force Claude to use a specific tool by setting the request parameter 'tool_choice' to type 'tool' and providing the name of the target tool.