Trait clust::messages::Tool

source ·
pub trait Tool {
    // Required methods
    fn definition(&self) -> ToolDefinition;
    fn call(&self, tool_use: ToolUse) -> Result<ToolResult, ToolCallError>;
}
Expand description

A tool that can be used by assistant.

Required Methods§

source

fn definition(&self) -> ToolDefinition

Gets the definition of the tool.

source

fn call(&self, tool_use: ToolUse) -> Result<ToolResult, ToolCallError>

Calls the tool.

Implementors§