Skip to main content
Glama

Google Ads MCP Server

by martechery

execute_gaql_query

Run Google Ads Query Language (GAQL) queries to retrieve campaign data, performance metrics, and account information with pagination support and multiple output formats.

Instructions

Execute GAQL. Aliases accepted: customerId, pageSize, pageToken, autoPaginate, maxPages, outputFormat.

Input Schema

NameRequiredDescriptionDefault
autoPaginateNoAlias of auto_paginate.
auto_paginateNofetch multiple pages automatically
customerIdNoAlias of customer_id.
customer_idNo10-digit customer ID (no dashes). Optional.
maxPagesNoAlias of max_pages.
max_pagesNolimit when auto_paginate=true (1-20)
outputFormatNoAlias of output_format.
output_formatNorender formattable
pageSizeNoAlias of page_size.
pageTokenNoAlias of page_token.
page_sizeNooptional page size (1-10000)
page_tokenNooptional page token
queryYesGAQL query string. Examples: SELECT campaign.id, campaign.name, metrics.clicks FROM campaign WHERE segments.date DURING LAST_30_DAYS LIMIT 10 SELECT ad_group_ad.ad.id, metrics.impressions FROM ad_group_ad WHERE campaign.status = 'ENABLED' LIMIT 50

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "autoPaginate": { "description": "Alias of auto_paginate.", "type": "boolean" }, "auto_paginate": { "default": false, "description": "fetch multiple pages automatically", "type": "boolean" }, "customerId": { "description": "Alias of customer_id.", "type": [ "string", "number" ] }, "customer_id": { "description": "10-digit customer ID (no dashes). Optional.", "type": "string" }, "maxPages": { "description": "Alias of max_pages.", "maximum": 20, "minimum": 1, "type": "number" }, "max_pages": { "default": 5, "description": "limit when auto_paginate=true (1-20)", "maximum": 20, "minimum": 1, "type": "number" }, "outputFormat": { "description": "Alias of output_format.", "enum": [ "table", "json", "csv" ], "type": "string" }, "output_format": { "default": "table", "description": "render format", "enum": [ "table", "json", "csv" ], "type": "string" }, "pageSize": { "description": "Alias of page_size.", "minimum": 1, "type": "number" }, "pageToken": { "description": "Alias of page_token.", "type": "string" }, "page_size": { "description": "optional page size (1-10000)", "minimum": 1, "type": "number" }, "page_token": { "description": "optional page token", "type": "string" }, "query": { "description": "GAQL query string. Examples:\nSELECT campaign.id, campaign.name, metrics.clicks FROM campaign WHERE segments.date DURING LAST_30_DAYS LIMIT 10\nSELECT ad_group_ad.ad.id, metrics.impressions FROM ad_group_ad WHERE campaign.status = 'ENABLED' LIMIT 50", "type": "string" } }, "required": [ "query" ], "type": "object" }

Other Tools from Google Ads MCP Server

Related Tools

    MCP directory API

    We provide all the information about MCP servers via our MCP API.

    curl -X GET 'https://glama.ai/api/mcp/v1/servers/martechery/mcp-google-ads-ts'

    If you have feedback or need assistance with the MCP directory API, please join our Discord server