> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://gtm-tools.sh/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://gtm-tools.sh/_mcp/server.

# Google ADK

> Connect a Google ADK agent to the GTM Tools MCP server so it can qualify accounts on buying signals, find decision-makers on LinkedIn, and verify professional emails.

## Getting started

[Google Agent Development Kit (ADK)](https://adk.dev) is an open-source framework for building AI agents. Connecting it to the [GTM Tools MCP server](/integrations/mcp) gives your agent the whole GTM data surface through natural language: detect buying signals on a domain, resolve a company's LinkedIn page, search employees with boolean title filters, verify professional emails, and read or write on Reddit.

## Use cases

* **Qualify accounts before spending on them:** run `detect_signal` across a target list and let the agent decide which companies are worth researching.
* **Build a prospect list end to end:** domain → LinkedIn company → filtered employee search → SMTP-verified email, in one agent turn.
* **Monitor accounts on a schedule:** ADK agents run headless, so a nightly run can sweep signals and surface only what changed.

## Prerequisites

1. A GTM Tools API key, from `get_api_key` or `gtm-tools admin login`. See [Get an API key](/integrations/agent-onboarding#get-an-api-key).
2. ADK installed: `pip install google-adk` (Python) or `npm install @google/adk` (TypeScript).

## Setup

ADK talks to GTM Tools through its MCP tool interface. Point `McpToolset` at the hosted Streamable HTTP endpoint and pass the key as a bearer header:

**`Python`**

```python title="Python"
import os

from google.adk.agents import Agent
from google.adk.tools.mcp_tool import McpToolset, StreamableHTTPConnectionParams

root_agent = Agent(
    model="gemini-2.5-pro",
    name="gtm_agent",
    instruction=(
        "Help the user qualify accounts and find decision-makers. "
        "Always run detect_signal before spending credits on LinkedIn tools."
    ),
    tools=[
        McpToolset(
            connection_params=StreamableHTTPConnectionParams(
                url="https://api.gtm-tools.sh/mcp",
                headers={
                    "Authorization": f"Bearer {os.environ['GTM_TOOLS_API_KEY']}"
                },
                timeout=30,
                sse_read_timeout=300,
            ),
        )
    ],
)
```

**`TypeScript`**

```typescript title="TypeScript"
import { LlmAgent, MCPToolset } from "@google/adk";

const rootAgent = new LlmAgent({
  model: "gemini-2.5-pro",
  name: "gtm_agent",
  instruction:
    "Help the user qualify accounts and find decision-makers. " +
    "Always run detect_signal before spending credits on LinkedIn tools.",
  tools: [
    new MCPToolset({
      type: "StreamableHTTPConnectionParams",
      url: "https://api.gtm-tools.sh/mcp",
      transportOptions: {
        requestInit: {
          headers: {
            Authorization: `Bearer ${process.env.GTM_TOOLS_API_KEY}`,
          },
        },
      },
    }),
  ],
});

export { rootAgent };
```

> **Warning**
>
> `StreamableHTTPConnectionParams.timeout` defaults to 5 seconds in the Python SDK. Several GTM Tools calls legitimately run longer, since `get_email` performs SMTP probes and `list_linkedin_company_employees` triggers an upstream search, so raise `timeout` and `sse_read_timeout`. A cancelled call still costs credits, since the charge lands before the tool runs.

In TypeScript, set headers through `transportOptions.requestInit.headers`. The older top-level `header` field is deprecated and is ignored entirely when `transportOptions` is present.

## Available tools

`McpToolset` discovers the tool catalog from the server at connection time, so there is no fixed inventory to copy into your code. The server exposes **64 tools**: 8 billing, 19 LinkedIn, 21 Reddit, 3 enrichment, and 13 signals.

See the [MCP tool catalogue](/integrations/mcp#tool-catalogue) for names and parameter shapes, and [Pricing](/pricing) for the credit cost of each. `get_credit_balance` returns the live cost table at runtime.

## Narrow the tool set

Feeding all 64 tools to the model wastes context and invites wrong picks, so narrow to the workflow you are building:

```python
McpToolset(
    connection_params=StreamableHTTPConnectionParams(url="https://api.gtm-tools.sh/mcp", headers=...),
    tool_filter=[
        "detect_signal",
        "get_linkedin_company_url",
        "list_linkedin_company_employees",
        "get_email",
    ],
)
```

`tool_filter` accepts a list of names or a predicate. The TypeScript constructor takes it as the second positional argument: `new MCPToolset(connectionParams, ["detect_signal", "get_email"])`.