[DOCS] Missing ToolsPreset type definition in Python SDK Reference
Documentation Type
Missing documentation (feature not documented)
Documentation Location
https://platform.claude.com/docs/en/agent-sdk/python
Section/Topic
"Types" section - specifically the ClaudeAgentOptions class definition and types reference
Current Documentation
The ClaudeAgentOptions class definition references ToolsPreset:
@dataclass
class ClaudeAgentOptions:
tools: list[str] | ToolsPreset | None = None
And the property table documents:
| Property | Type | Description |
| :--- | :--- | :--- |
| tools | list[str] \| ToolsPreset \| None | Tools configuration. Use {"type": "preset", "preset": "claude_code"} for Claude Code's default tools |
The similar SystemPromptPreset type IS documented:
class SystemPromptPreset(TypedDict):
type: Literal["preset"]
preset: Literal["claude_code"]
append: NotRequired[str]
But there is no corresponding definition for ToolsPreset.
What's Wrong or Missing?
The ToolsPreset type is used in the API but not formally defined in the Types section. Users cannot know:
- What structure
ToolsPresetexpects (though the description hints at{"type": "preset", "preset": "claude_code"}) - What valid preset values are available (is it only
"claude_code"?) - Whether it has optional fields like
SystemPromptPresethasappend
The description provides a usage example but not a formal type definition, which is inconsistent with how SystemPromptPreset is documented.
Suggested Improvement
Add the ToolsPreset type definition to the "Types" section, following the SystemPromptPreset pattern:
class ToolsPreset(TypedDict):
type: Literal["preset"]
preset: Literal["claude_code"]
Or if ToolsPreset has additional fields or preset values, document them accordingly.
Impact
High - Prevents users from using a feature
Additional Context
- Mirror location:
platform.claude.com/docs/en/agent-sdk/python.md - The sibling type
SystemPromptPresetis properly documented with a full TypedDict definition - TypeScript SDK documents the equivalent as inline:
{ type: 'preset'; preset: 'claude_code' }
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗