[DOCS] Missing `code_execution_20250825` Tool Schema in Messages API Reference
Documentation Type
Unclear/confusing documentation
Documentation Location
https://platform.claude.com/docs/en/api/messages
Section/Topic
Create Message -> Body Parameters -> tools -> ToolUnion definition.
Current Documentation
The tools parameter documentation lists the following supported types in the ToolUnion:
-Tool = object { input_schema, name, cache_control, 2 more }-ToolBash20250124 = object { name, type, cache_control }-ToolTextEditor20250124 = object { name, type, cache_control }-ToolTextEditor20250429 = object { name, type, cache_control }-ToolTextEditor20250728 = object { name, type, cache_control, max_characters }-WebSearchTool20250305 = object { name, type, allowed_domains, 4 more }
What's Wrong or Missing?
The Code Execution Tool is missing from the list of defined tool types in the Messages API reference, despite being a major feature documented elsewhere in the "Build with Claude" guides.
The guide at docs/en/agents-and-tools/tool-use/code-execution-tool explicitly states that the tool type is code_execution_20250825, but this type is not listed as a valid option in the formal API reference for tools.
Suggested Improvement
Add ToolCodeExecution20250825 (or equivalent naming convention) to the ToolUnion definition list in the Messages API reference.
Based on the Code Execution Tool guide, the schema definition should look something like this:
ToolCodeExecution20250825 = object { name, type, cache_control }name: "code_execution"
Name of the tool.
"code_execution"type: "code_execution_20250825""code_execution_20250825"cache_control: optional CacheControlEphemeral
Create a cache control breakpoint at this content block.
...
Impact
High - Prevents users from using a feature
Additional Context
- Reference Guide: Code Execution Tool Documentation shows the tool definition requires
type: "code_execution_20250825"andname: "code_execution". - The omission makes the API reference incomplete for developers generating types or client libraries based on the documentation schema.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗