McpTool
class McpTool(mcpClient: Client, val descriptor: ToolDescriptor) : Tool<McpTool.Args, McpTool.Result> (source)
A Tool implementation that calls an MCP (Model Context Protocol) tool.
This class serves as a bridge between the agent framework's Tool interface and the MCP SDK. It allows MCP tools to be used within the agent framework by:
Converting agent framework tool arguments to MCP tool arguments
Calling the MCP tool through the MCP client
Converting MCP tool results back to agent framework tool results
Types
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
suspend fun executeAndSerialize(args: McpTool.Args, enabler: DirectToolCallsEnabler): Pair<McpTool.Result, String>
Link copied to clipboard