McpToolExecutor

Trait McpToolExecutor 

Source
pub trait McpToolExecutor: Send + Sync {
    // Required methods
    fn execute_mcp_tool<'life0, 'life1, 'async_trait>(
        &'life0 self,
        tool_name: &'life1 str,
        args: Value,
    ) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn list_mcp_tools<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<McpToolInfo>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn has_mcp_tool<'life0, 'life1, 'async_trait>(
        &'life0 self,
        tool_name: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_status(&self) -> McpClientStatus;
}
Expand description

Trait for MCP tool execution

Required Methods§

Source

fn execute_mcp_tool<'life0, 'life1, 'async_trait>( &'life0 self, tool_name: &'life1 str, args: Value, ) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Execute an MCP tool

Source

fn list_mcp_tools<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<McpToolInfo>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

List available MCP tools

Source

fn has_mcp_tool<'life0, 'life1, 'async_trait>( &'life0 self, tool_name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Check if an MCP tool exists

Source

fn get_status(&self) -> McpClientStatus

Get MCP client status information

Implementors§