Skip to main content

ToolProvider

Trait ToolProvider 

Source
pub trait ToolProvider: Send + Sync {
    // Required methods
    fn list_tools(&self) -> Result<Vec<Tool>, ProtocolError>;
    fn call_tool<'life0, 'life1, 'async_trait>(
        &'life0 self,
        name: &'life1 str,
        arguments: Option<Value>,
    ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ProtocolError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Tool Provider Trait - Pure abstraction for tool operations

Required Methods§

Source

fn list_tools(&self) -> Result<Vec<Tool>, ProtocolError>

List tools from this provider

Source

fn call_tool<'life0, 'life1, 'async_trait>( &'life0 self, name: &'life1 str, arguments: Option<Value>, ) -> Pin<Box<dyn Future<Output = Result<CallToolResult, ProtocolError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Execute tool via this provider

Implementors§