Skip to main content

Tool

Trait Tool 

Source
pub trait Tool: Send + Sync {
    // Required methods
    fn definition(&self) -> ToolDefinition;
    fn invoke<'a>(
        &'a self,
        args_json: &'a str,
        context: &'a ToolExecutionContext,
    ) -> Pin<Box<dyn Future<Output = Result<String, ToolError>> + Send + 'a>>;
}

Required Methods§

Source

fn definition(&self) -> ToolDefinition

Source

fn invoke<'a>( &'a self, args_json: &'a str, context: &'a ToolExecutionContext, ) -> Pin<Box<dyn Future<Output = Result<String, ToolError>> + Send + 'a>>

Implementors§