Process results programmatically changedagents-and-tools/tool-use/programmatic-tool-calling
Recorded here
Lines+41added
Lines−12removed
From line
4
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits21to this page, all time
## Availability ### API support #### [Messages API](https://platform.claude.com/docs/en/build-with-claude/working-with-messages) #### [Managed Agents](https://platform.claude.com/docs/en/managed-agents/overview) ### Data handling
The whole hunk
from line 4, old and new numbered
/
from line 4
44description: Let Claude call your tools from code in the code execution container, cutting model round trips and token use in multi-tool workflows.
55featureMetadata:
66 status: ga
7 zdr: not-eligible
7 zdr:
8 eligibility: not-eligible
9 note: Built on code execution containers; data retained up to 30 days.
810 supportedModels:
911 - claude-fable-5-1
1012 - claude-mythos-5-1
1113 - claude-fable-5
1214 - claude-mythos-5
15 - claude-mythos-preview
1316 - claude-opus-5-5
1417 - claude-opus-5
18 - claude-sonnet-5-5
19 - claude-sonnet-5
20 - claude-haiku-5-5
1521 - claude-opus-4-8
1622 - claude-opus-4-7
1723 - claude-opus-4-6
18 - claude-opus-4-5-20251101
19 - claude-sonnet-5-5
20 - claude-sonnet-5
2124 - claude-sonnet-4-6
25 - claude-opus-4-5-20251101
2226 - claude-sonnet-4-5-20250929
23 - claude-haiku-5-5
2427 supportedPlatforms:
2528 Claude API: ga
2629 Claude Platform on AWS: ga
27 Microsoft Foundry:
28 availability: ga
29 note: On [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), programmatic tool calling requires a [Hosted on Anthropic deployment](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry#additional-features-not-supported-when-hosted-on-azure).
30 Microsoft Foundry (hosted on Anthropic): ga
3031 details:
3132 - Programmatic tool calling requires the code execution tool with the `code_execution_20260120` or later [tool version](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool#tool-versions).
32 - Claude Haiku 4.5 accepts the `code_execution_20260120` and later tool versions but doesn't support programmatic tool calling.
3333---
3434
3535Programmatic tool calling allows Claude to write code that calls your tools programmatically within a [code execution](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool) container, rather than requiring round trips through the model for each tool call. 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 such as [BrowseComp](https://arxiv.org/abs/2504.12516) and [DeepSearchQA](https://github.com/google-deepmind/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 percent while using 24 percent fewer input tokens (see [Improved web search with dynamic filtering](https://claude.com/blog/improved-web-search-with-dynamic-filtering)).
from line 40
4040 For a deeper look at the inference and context costs that programmatic tool calling addresses, see [Advanced tool use](https://www.anthropic.com/engineering/advanced-tool-use).
4141</Tip>
4242
43Programmatic tool calling requires the [code execution tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool) with tool version `code_execution_20260120` or later. To check whether a model supports programmatic tool calling before you send a request, read its `capabilities.code_execution.supported` value from the Models API. [Using the Models API](https://platform.claude.com/docs/en/models/overview#using-the-models-api) describes the field.
43Programmatic tool calling requires the [code execution tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool) with tool version `code_execution_20260120` or later. Claude Haiku 4.5 accepts the `code_execution_20260120` and later tool versions but doesn’t support programmatic tool calling. To check whether a model supports programmatic tool calling before you send a request, read its `capabilities.code_execution.supported` value from the Models API. [Using the Models API](https://platform.claude.com/docs/en/models/overview#using-the-models-api) describes the field.
4444
4545## Quick start
4646
from line 1551
15511551
15521552Programmatic tool calling is built on the code execution infrastructure and uses the same sandbox containers. Container data, including execution artifacts and outputs, is retained for up to 30 days.
15531553
1554For ZDR eligibility across all features, see [API and data retention](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention).
1555
15561554## Next steps
15571555
15581556<CardGroup cols={2}>
from line 1570
15721570 Specify tool schemas, write effective descriptions, and control when Claude calls your tools.
15731571 </Card>
15741572</CardGroup>
1573
1574## Availability
1575
1576Programmatic tool calling is available on select models.
1577
1578### API support
1579
1580#### [Messages API](https://platform.claude.com/docs/en/build-with-claude/working-with-messages)
1581
1582* Availability: Available
1583
1584| Status | Cloud platforms | Models |
1585| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1586| Available | Claude API, [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Microsoft Foundry (hosted on Anthropic)](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) | [Claude Fable 5.1](https://platform.claude.com/docs/en/models/fable-5-1/overview), [Claude Mythos 5.1](https://platform.claude.com/docs/en/models/mythos-5-1/overview), [Claude Fable 5](https://platform.claude.com/docs/en/models/fable-5/overview), [Claude Mythos 5](https://platform.claude.com/docs/en/models/mythos-5/overview), Claude Mythos Preview, [Claude Opus 5.5](https://platform.claude.com/docs/en/models/opus-5-5/overview), [Claude Opus 5](https://platform.claude.com/docs/en/models/opus-5/overview), [Claude Sonnet 5.5](https://platform.claude.com/docs/en/models/sonnet-5-5/overview), [Claude Sonnet 5](https://platform.claude.com/docs/en/models/sonnet-5/overview), [Claude Haiku 5.5](https://platform.claude.com/docs/en/models/haiku-5-5/overview), [Claude Opus 4.8](https://platform.claude.com/docs/en/models/opus-4-8/overview), [Claude Opus 4.7](https://platform.claude.com/docs/en/models/opus-4-7/overview), [Claude Opus 4.6](https://platform.claude.com/docs/en/models/opus-4-6/overview), [Claude Sonnet 4.6](https://platform.claude.com/docs/en/models/sonnet-4-6/overview), [Claude Opus 4.5](https://platform.claude.com/docs/en/models/opus-4-5/overview), [Claude Sonnet 4.5](https://platform.claude.com/docs/en/models/sonnet-4-5/overview) |
1587
1588#### [Managed Agents](https://platform.claude.com/docs/en/managed-agents/overview)
1589
1590* Availability: Not available
1591
1592### Data handling
1593
1594[Data handling overview](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#feature-eligibility)
1595
1596| Item | Zero data retention | HIPAA |
1597| ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ |
1598| Status | Not eligible | Not eligible |
1599| Details | Built on code execution containers; data retained up to 30 days. [Learn more](https://platform.claude.com/docs/en/agents-and-tools/tool-use/programmatic-tool-calling#data-retention) | — |
1600
1601Applicable endpoints:
1602
1603* `/v1/messages` with `code_execution` tool
15751604
No line in this hunk matches that.