Compatibility
- ZDR: not eligible
- Supported models:
claude-fable-5-1,claude-mythos-5-1,claude-fable-5,claude-mythos-5,claude-opus-5,claude-opus-4-8,claude-opus-4-7,claude-opus-4-6,claude-opus-4-5-20251101,claude-sonnet-5,claude-sonnet-4-6,claude-sonnet-4-5-20250929 - Platforms: Claude API, Claude Platform on AWS, Microsoft Foundry [1]; not available on Amazon Bedrock, Google Cloud
- Programmatic tool calling requires the code execution tool with the
code_execution_20260120or later tool version. - Claude Haiku 4.5 accepts the
code_execution_20260120and later tool versions but doesn't support programmatic tool calling.
- On Microsoft Foundry, programmatic tool calling requires a Hosted on Anthropic deployment.
Programmatic tool calling allows Claude to write code that calls your tools programmatically within a code execution container, rather than requiring round trips through the model for each tool invocation. This reduces latency for multi-tool workflows and decreases token consumption by allowing Claude to filter or process data before it reaches the model's context window. On agentic search benchmarks like BrowseComp and DeepSearchQA, which test multistep web research and complex information retrieval, adding programmatic tool calling on top of basic search tools improved performance by an average of 11% while using 24% fewer input tokens (see Improved web search with dynamic filtering).
Consider checking budget compliance across 20 employees: the traditional approach requires 20 separate model round-trips, pulling thousands of expense line items into the context along the way. With programmatic tool calling, a single script runs all 20 lookups, filters the results, and returns only the employees who exceeded their limits, shrinking what Claude needs to reason over from hundreds of kilobytes down to a handful of lines.
For a deeper look at the inference and context costs that programmatic tool calling addresses, see Advanced tool use.
Programmatic tool calling requires the code execution tool with tool version code_execution_20260120 or later.