Skip to main content
Glama

run_gaql_query

Execute raw GAQL queries against Google Ads accounts to retrieve campaign and performance data, with optional row limits and full CSV export of results.

Instructions

Execute a raw GAQL query. Saves full results to CSV. WARNING: limit=0 fetches all rows — use with caution on large accounts.

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": {
      "query": "<query>"
    },
    "name": "run_gaql_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMax rows to return (0 = no limit)
queryYesGAQL query to execute
customer_idNoGoogle Ads customer ID (no dashes). Uses active account if not provided.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.1

TDQS

A3.6/5.0
Behavior3/5

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

No annotations exist, so the description carries the full behavioral burden. It does disclose two non-obvious behaviors: results are persisted to a CSV file, and limit=0 disables row limits. It omits where the CSV is written, whether it overwrites previous output, and the read-only nature of GAQL execution, leaving meaningful gaps for an unannotated tool.

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

Conciseness5/5

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

Three short sentences with zero filler; the core action comes first, the CSV side effect second, and the risk warning last where it is most likely to be read before invoking.

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

Completeness4/5

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

An output schema exists, so return values need not be explained, and the description covers the action, the persistence side effect, and the one dangerous parameter value. For a raw-query tool with no annotations it could still say more about error behavior or CSV destination, but nothing critical to a correct invocation is missing.

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 description coverage is 100%, so all three parameters are already documented. The description's note on limit=0 largely restates the schema's '(0 = no limit)' while adding only the practical consequence about large accounts, and it says nothing additional about query syntax or customer_id semantics. Baseline 3 is appropriate.

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

Purpose4/5

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

States a specific verb and resource ('Execute a raw GAQL query') plus a concrete side effect ('Saves full results to CSV'), which is enough to tell it apart from the prebuilt report siblings like get_campaign_performance. It stops short of explicitly contrasting itself with those report tools, so an agent must infer that this is the raw escape hatch.

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

Usage Guidelines3/5

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

Gives one real usage caveat — 'limit=0 fetches all rows — use with caution on large accounts' — which shapes how to set a parameter. However, there is no guidance on when to prefer this over prebuilt performance/report tools, and no stated prerequisites such as which account the query runs against.

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

Deploy Server

Other Tools