Skip to main content

Tool

Trait Tool 

Source
pub trait Tool: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn description(&self) -> &str;
    fn needs_approval(&self) -> bool;
    fn execute(&self, input: Value, cwd: &Path) -> ToolResult;
}
Expand description

A tool that can be invoked by the runtime.

Required Methods§

Source

fn name(&self) -> &str

Source

fn description(&self) -> &str

Source

fn needs_approval(&self) -> bool

Source

fn execute(&self, input: Value, cwd: &Path) -> ToolResult

Implementors§