Skip to main content

McpExecutor

Trait McpExecutor 

Source
pub trait McpExecutor: Send + Sync {
    // Required method
    fn call_tool<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        server_id: &'life1 str,
        tool_name: &'life2 str,
        args: JsonValue,
    ) -> Pin<Box<dyn Future<Output = Result<JsonValue, ExecutionError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

Executor for MCP foundation server calls.

Analogous to HttpExecutor for API calls, this trait abstracts MCP tool invocation for use in the AST-based executor. Implementations delegate to actual foundation clients (e.g., CompositionClient).

Required Methods§

Source

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

Call a tool on a foundation server.

Implementors§