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§
Sourcefn list_tools(&self) -> Result<Vec<Tool>, ProtocolError>
fn list_tools(&self) -> Result<Vec<Tool>, ProtocolError>
List tools from this provider
Sourcefn 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,
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