Skip to main content

McpToolExecutor

Trait McpToolExecutor 

Source
pub trait McpToolExecutor: Send + Sync {
    // Required methods
    fn execute_mcp_tool<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        tool_name: &'life1 str,
        args: &'life2 Value,
    ) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: '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 abstraction used by the tool registry to talk to the MCP client.

Required Methods§

Source

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

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,

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,

Source

fn get_status(&self) -> McpClientStatus

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§