pub enum ToolUnionParam {
CustomTool(ToolParam),
Bash20241022(ToolBash20241022),
Bash20250124(ToolBash20250124),
TextEditor20250124(ToolTextEditor20250124),
TextEditor20250429(ToolTextEditor20250429),
TextEditor20250728(ToolTextEditor20250728),
WebSearch20250305(WebSearchTool20250305),
}anthropic-client only.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) -> ToolUnionParam
pub fn new_custom_tool(name: String, input_schema: Value) -> ToolUnionParam
Creates a new custom tool
Sourcepub fn new_bash_20241022_tool() -> ToolUnionParam
pub fn new_bash_20241022_tool() -> ToolUnionParam
Creates a new bash tool (version 20241022)
Sourcepub fn new_bash_tool() -> ToolUnionParam
pub fn new_bash_tool() -> ToolUnionParam
Creates a new bash tool (version 20250124)
Sourcepub fn new_text_editor_tool() -> ToolUnionParam
pub fn new_text_editor_tool() -> ToolUnionParam
Creates a new text editor tool
Sourcepub fn new_text_editor_20250429_tool() -> ToolUnionParam
pub fn new_text_editor_20250429_tool() -> ToolUnionParam
Creates a new text editor tool (version 20250429)
Sourcepub fn new_text_editor_20250728_tool() -> ToolUnionParam
pub fn new_text_editor_20250728_tool() -> ToolUnionParam
Creates a new text editor tool (version 20250728)
Sourcepub fn new_web_search_tool() -> ToolUnionParam
pub fn new_web_search_tool() -> ToolUnionParam
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ToolUnionParam
impl Debug for ToolUnionParam
Source§impl<'de> Deserialize<'de> for ToolUnionParam
impl<'de> Deserialize<'de> for ToolUnionParam
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ToolUnionParam, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ToolUnionParam, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for ToolUnionParam
impl PartialEq for ToolUnionParam
Source§fn eq(&self, other: &ToolUnionParam) -> bool
fn eq(&self, other: &ToolUnionParam) -> bool
self and other values to be equal, and is used by ==.