Trait ToolProvider

Source
pub trait ToolProvider: Send + Sync {
    // Required methods
    fn get_tool<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Tool> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn execute<'life0, 'async_trait>(
        &'life0 self,
        arguments: Value,
    ) -> Pin<Box<dyn Future<Output = Result<ToolResult, McpError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn get_tool<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Tool> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get tool definition

Source

fn execute<'life0, 'async_trait>( &'life0 self, arguments: Value, ) -> Pin<Box<dyn Future<Output = Result<ToolResult, McpError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Execute tool

Implementors§