mcp_adapter
diapason.tools.mcp_adapter
¶
MCP tool adapter — wraps external MCP server tools as native BaseTool instances.
MCPToolAdapter
¶
Bases: BaseTool
Wraps a single MCP-hosted tool as a native BaseTool.
This adapter enables tools discovered from external MCP servers to
be used seamlessly within Diapason agents via the ToolExecutor.
Parameters¶
client:
The MCPClient connected to the external MCP server.
tool_spec:
The ToolSpec describing this tool (from MCPClient.list_tools()).
execute(**params)
¶
Execute the remote MCP tool and return a ToolResult.