A class for managing MCP tools similar to Python's MCPToolset. Provides functionality to retrieve and use tools from an MCP server.

Constructors

Methods

  • Set a sampling handler for this MCP toolset. This allows MCP servers to request LLM completions through your ADK agent.

    Parameters

    • handler: SamplingHandler

      ADK sampling handler that receives ADK-formatted messages

    Returns void

  • Disposes of all resources. This method should be called when the toolset is no longer needed. Provides alignment with disposal patterns common in TypeScript.

    Returns Promise<void>