pub enum ToolUnionParam {
CustomTool(ToolParam),
Bash20241022(ToolBash20241022),
Bash20250124(ToolBash20250124),
TextEditor20250124(ToolTextEditor20250124),
TextEditor20250429(ToolTextEditor20250429),
TextEditor20250728(ToolTextEditor20250728),
WebSearch20250305(WebSearchTool20250305),
}Expand description
Union type for different tool parameter types.
This type represents a union of different tool types that can be used with Claude, including:
- Custom tools
- Bash tools
- Text editor tools
- Web search tools
The API accepts any of these tool types when tools are provided to Claude.
Variants§
CustomTool(ToolParam)
A custom tool with a defined schema
Bash20241022(ToolBash20241022)
A bash tool for executing shell commands (version 20241022)
Bash20250124(ToolBash20250124)
A bash tool for executing shell commands (version 20250124)
TextEditor20250124(ToolTextEditor20250124)
A text editor tool for making changes to text
TextEditor20250429(ToolTextEditor20250429)
A text editor tool for making changes to text (version 20250429)
TextEditor20250728(ToolTextEditor20250728)
A text editor tool for making changes to text (version 20250728)
WebSearch20250305(WebSearchTool20250305)
A web search tool for retrieving information from the internet
Implementations§
Source§impl ToolUnionParam
impl ToolUnionParam
Sourcepub fn new_custom_tool(name: String, input_schema: Value) -> Self
pub fn new_custom_tool(name: String, input_schema: Value) -> Self
Creates a new custom tool
Sourcepub fn new_bash_20241022_tool() -> Self
pub fn new_bash_20241022_tool() -> Self
Creates a new bash tool (version 20241022)
Sourcepub fn new_bash_tool() -> Self
pub fn new_bash_tool() -> Self
Creates a new bash tool (version 20250124)
Sourcepub fn new_text_editor_tool() -> Self
pub fn new_text_editor_tool() -> Self
Creates a new text editor tool
Sourcepub fn new_text_editor_20250429_tool() -> Self
pub fn new_text_editor_20250429_tool() -> Self
Creates a new text editor tool (version 20250429)
Sourcepub fn new_text_editor_20250728_tool() -> Self
pub fn new_text_editor_20250728_tool() -> Self
Creates a new text editor tool (version 20250728)
Sourcepub fn new_web_search_tool() -> Self
pub fn new_web_search_tool() -> Self
Creates a new web search tool
Trait Implementations§
Source§impl Clone for ToolUnionParam
impl Clone for ToolUnionParam
Source§fn clone(&self) -> ToolUnionParam
fn clone(&self) -> ToolUnionParam
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more