pub trait ToolHandler:
Send
+ Sync
+ 'static {
// Required methods
fn name(&self) -> &'static str;
fn description(&self) -> &'static str;
fn schema(&self) -> Value;
fn call<'life0, 'async_trait>(
&'life0 self,
params: Value,
) -> Pin<Box<dyn Future<Output = ToolResult<Value>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Trait for implementing MCP tools
Required Methods§
Sourcefn description(&self) -> &'static str
fn description(&self) -> &'static str
A description of what the tool does