Skip to main content

Module mcp_tool_bridge

Module mcp_tool_bridge 

Source
Expand description

MCP tool definition to text-tool-simulation bridge

§MCP Tool Bridge

Converts MCP (Model Context Protocol) tool definitions into embacle’s text-based tool simulation types (FunctionDeclaration, TextToolHandler).

This enables using MCP-compatible tool servers with any embacle CLI runner via the text-based tool loop.

§Async bridging

[create_mcp_tool_handler()] bridges the async McpToolExecutor trait to the synchronous TextToolHandler callback via tokio::task::block_in_place. This requires a multi-threaded tokio runtime (rt-multi-thread feature).

Structs§

McpToolDefinition
An MCP tool definition describing a callable tool

Traits§

McpToolExecutor
Trait for executing MCP tool calls asynchronously

Functions§

create_mcp_tool_handler
Create a TextToolHandler that delegates to an async McpToolExecutor.
mcp_tools_to_declarations
Convert MCP tool definitions to embacle FunctionDeclaration values.