Run Gaql Query
run_gaql_queryExecutes 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
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | A valid GAQL query string | |
| customer_id | Yes | Google Ads account ID |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |