Skip to main content
Glama
Google Ads MCP

Google Ads MCP

by gabogabucho

Run Gaql Query

run_gaql_query

Executes custom GAQL queries for advanced Google Ads analysis of campaigns, ad groups, keywords, and search terms when standard tools don't cover the needed data.

Instructions

Execute a custom Google Ads Query Language (GAQL) query.

Use this for advanced analysis not covered by the other tools. GAQL syntax: SELECT fields FROM resource WHERE conditions ORDER BY ... LIMIT n

Common resources: campaign, ad_group, keyword_view, search_term_view, ad_group_ad, campaign_criterion, ad_group_criterion

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "customer_id": "<customer_id>",
      "query": "<query>"
    },
    "name": "run_gaql_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesA valid GAQL query string
customer_idYesGoogle Ads account ID

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses that arbitrary custom queries run against the account and shows the GAQL clause grammar, but does not mention read-only nature, authentication/developer-token requirements, row limits, or pagination behavior. The output schema covers return shape, which offsets part of the gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the action in one line, then a usage note, then a compact syntax sketch and resource list. The resource inventory is somewhat list-like but earns its place by reducing query-construction errors.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Output schema exists, so return values need not be explained, and the syntax hint plus resource list make the tool callable. However, for a tool that executes arbitrary user-authored queries with no annotations, it lacks any statement of read-only safety, limits, or error behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so both query and customer_id are documented in the schema itself. The description adds useful meaning by listing the GAQL clause order and common resources, but does not explain customer_id format or query validity constraints beyond 'valid GAQL query string'.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (Execute) and resource (custom GAQL query) and explicitly positions it as the escape hatch for advanced analysis not covered by other tools, which distinguishes it from the named performance/report siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says to use it for advanced analysis not covered by the other tools, which gives a clear routing condition. It does not name specific alternatives or state when not to use it, but the 'not covered by other tools' clause supplies the exclusion logic.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.