pub trait ToolHandler: Send + Sync {
// Required methods
fn definition(&self) -> McpTool;
fn execute<'life0, 'async_trait>(
&'life0 self,
arguments: Value,
) -> Pin<Box<dyn Future<Output = Result<CallToolResult, McpError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Handler for a single tool
Required Methods§
Sourcefn definition(&self) -> McpTool
fn definition(&self) -> McpTool
Get the tool definition