fromClient

suspend fun fromClient(mcpClient: Client, mcpToolParser: McpToolDescriptorParser = DefaultMcpToolDescriptorParser): ToolRegistry(source)

Creates a ToolRegistry with tools from an existing MCP client.

This method retrieves all available tools from the MCP server using the provided client, transforms them into the agent framework's Tool interface, and registers them in a ToolRegistry.

Return

A ToolRegistry containing all tools from the MCP server.

Parameters

mcpClient

The MCP client connected to an MCP server.