Skip to main content

Namespace: googleAdkAgents

Worker-side API for the Google ADK Temporal plugin.

The Google ADK plugin is an experimental feature; APIs may change without notice.

Classes​

Interfaces​

Type Aliases​

MCPToolsetFactory​

Ƭ MCPToolsetFactory: () => BaseToolset | MCPConnectionParams

A worker-side factory that produces a real MCP toolset (or connection params) for a registered server name. Connection details (process command, URL, headers) stay on the worker and never enter workflow inputs.

Returning a BaseToolset lets callers supply a fully-built toolset (including in-memory test doubles), at the cost of a real MCP toolset opening two sessions per tool call — against a stdio server, two subprocesses. Returning MCPConnectionParams lets the plugin open one session per call instead. Resources (listResources / readResource) need a toolset with ADK 2.0's resource methods — an MCPToolset — or connection params.

The plugin calls the factory on every Activity invocation, and closes only what it builds itself from MCPConnectionParams. A toolset holding a resource should therefore be a single long-lived instance the factory returns each time, and closing it stays the factory author's job. Supplying MCPConnectionParams instead hands that lifecycle to the plugin.

Type declaration​

▸ (): BaseToolset | MCPConnectionParams

Returns​

BaseToolset | MCPConnectionParams