google_ads_custom_query
Execute custom Google Ads Query Language (GAQL) queries to extract specific performance data. Write your own query to retrieve metrics, keywords, or campaign details.
Instructions
Execute a custom Google Ads Query Language (GAQL) query.
For advanced users who want to write their own GAQL queries. Use the Google Ads Query Builder to construct queries: https://developers.google.com/google-ads/api/fields/latest/overview_query_builder
Args: customer_id: Customer ID (without hyphens) query: GAQL query string response_format: Output format ('json' or 'markdown')
Returns: Query results in specified format
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": "google_ads_custom_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| customer_id | Yes | ||
| query | Yes | ||
| response_format | No | json |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |