Skip to main content
Glama

GSCPAP - Google Search Console, GA4, Bing Webmaster Tools & PageSpeed MCP

Search Analytics query

search_analytics_query
Read-only

Query Search Console analytics for a property.

Read-through cache pattern: if the requested date range is fully in the "stable past" (>3 days old) AND the Personal Archive has complete day coverage for it AND search_type=web AND data_state=final, the response is served from the archive (fast, zero GSC quota). Otherwise falls through to the Google API. The response includes a _source field so callers can tell which path was used.

Anonymized queries: archived rows are query-level, and Google leaves anonymized queries out of those, so the archive only answers what it can answer exactly: requests with the "query" dimension or a query filter, and totals (no dimensions, or only "date", no filters) from archived Search Console daily totals. A page, country or device breakdown without query goes to Google while the range is inside Google's ~16-month window. For older ranges the archive answers and adds a note saying the figures exclude anonymized traffic and are lower than Search Console's.

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": {
      "site_url": "<site_url>"
    },
    "name": "search_analytics_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
daysNoOptional. The last N days ending on end_date (so days=28 is the 28 days to 3 days ago). Use instead of start_date, not with it.
intentNoOptional: the user's goal in a few words. No site names or URLs.
end_dateNoISO date (YYYY-MM-DD). Defaults to 3 days ago (GSC ~3-day lag).
site_urlYesProperty URL exactly as returned by list_sites.
row_limitNoMax rows. Capped at 25000. Default 100.
start_rowNoPagination offset.
data_stateNo"all" includes fresh data and forces Google. "final" allows archive read. Ignored with "hour", which needs Google's hourly data state.all
dimensionsNoAny of "query", "page", "country", "device", "date", "hour", "brandedClassification", "searchAppearance". Omitted means ["query"]; an explicit empty list [] means the property-wide total. "hour", "brandedClassification" and "searchAppearance" always go to Google (not in the archive). "hour" covers about the last 10 days; keys are hour starts in Pacific time ("2026-11-14T13:00:00-08:00"), and without dates it defaults to the last 3 days through today. "brandedClassification" splits traffic into "BRANDED" and "NON_BRANDED" (Google's own classification, data from 2026-02-21, top-level properties only). Filter on it the same way, e.g. only non-branded queries: [{"filters": [{"dimension": "brandedClassification", "operator": "equals", "expression": "NON_BRANDED"}]}]
start_dateNoISO date (YYYY-MM-DD). Defaults to 28 days ago.
search_typeNoDefault "web". "webMultimodal" is web results reached by an image search (Google Lens, Circle to Search). Non-web types always go to Google.web
dimension_filter_groupsNoRaw GSC filter groups. Google itself takes only groupType "and"; an "or" group is accepted here when all its filters are on one of query, page, country or device.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / dimension_filter_groups / description
      Previous value: -"Raw GSC filter groups."New value: +"Raw GSC filter groups. Google itself\ntakes only groupType \"and\"; an \"or\" group is accepted here when\nall its filters are on one of query, page, country or device."
  2. Changed5 schema fields changed
    • changedInput schema / properties / data_state / description
      Previous value: -"\"all\" includes fresh data and forces Google. \"final\"\nallows archive read."New value: +"\"all\" includes fresh data and forces Google. \"final\"\nallows archive read. Ignored with \"hour\", which needs Google's\nhourly data state."
    • changedInput schema / properties / dimensions / anyOf
      Previous value: -[
      -  {
      -    "items": {
      -      "enum": [
      -        "query",
      -        "page",
      -        "country",
      -        "device",
      -        "date",
      -        "searchAppearance"
      -      ],
      -      "type": "string"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "enum": [
      +        "query",
      +        "page",
      +        "country",
      +        "device",
      +        "date",
      +        "hour",
      +        "brandedClassification",
      +        "searchAppearance"
      +      ],
      +      "type": "string"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / dimensions / description
      Previous value: -"Any of \"query\", \"page\", \"country\", \"device\", \"date\",\n\"searchAppearance\". Omitted means [\"query\"]; an explicit empty\nlist [] means the property-wide total. NB: searchAppearance forces\nGoogle fetch (not in archive schema)."New value: +"Any of \"query\", \"page\", \"country\", \"device\", \"date\",\n\"hour\", \"brandedClassification\", \"searchAppearance\". Omitted\nmeans [\"query\"]; an explicit empty list [] means the\nproperty-wide total. \"hour\", \"brandedClassification\" and\n\"searchAppearance\" always go to Google (not in the archive).\n\"hour\" covers about the last 10 days; keys are hour starts in\nPacific time (\"2026-11-14T13:00:00-08:00\"), and without dates it\ndefaults to the last 3 days through today.\n\"brandedClassification\" splits traffic into \"BRANDED\" and\n\"NON_BRANDED\" (Google's own classification, data from\n2026-02-21, top-level properties only). Filter on it the same\nway, e.g. only non-branded queries:\n[{\"filters\": [{\"dimension\": \"brandedClassification\",\n  \"operator\": \"equals\", \"expression\": \"NON_BRANDED\"}]}]"
    • changedInput schema / properties / search_type / description
      Previous value: -"Default \"web\". Non-web types always go to Google."New value: +"Default \"web\". \"webMultimodal\" is web results reached\nby an image search (Google Lens, Circle to Search). Non-web\ntypes always go to Google."
    • changedInput schema / properties / search_type / enum
      Previous value: -[
      -  "web",
      -  "image",
      -  "video",
      -  "news",
      -  "discover",
      -  "googleNews"
      -]New value: +[
      +  "web",
      +  "webMultimodal",
      +  "image",
      +  "video",
      +  "news",
      +  "discover",
      +  "googleNews"
      +]
  3. Changed1 schema field changed
    • addedInput schema / properties / intent
      Added value: +{
      +  "description": "Optional: the user's goal in a few words. No site names or URLs.",
      +  "type": "string"
      +}
  4. Changed1 schema field changed
    • addedInput schema / properties / days
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Optional. The last N days ending on end_date (so days=28 is\nthe 28 days to 3 days ago). Use instead of start_date, not with it."
      +}
  5. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Annotations only cover read-only/open-world/no-destruction, while the description adds substantial behavior beyond them: a `_source` field identifies the serving path, archive reads cost zero GSC quota, and older ranges may carry a `note` warning that figures exclude anonymized traffic and are lower than Search Console's. It also discloses a real data-fidelity limitation (anonymized queries are absent from query-level archived rows) that an agent could otherwise misread as a drop in performance.

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-loads the core purpose in one line, then splits cache mechanics and anonymization caveats into two labeled paragraphs. Dense but every paragraph carries distinct information; the anonymized-queries paragraph is long and slightly repetitive in restating what the archive "can answer exactly."

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?

For an 11-parameter tool with no output schema, the description covers the risky parts: data freshness, quota behavior, which dimensions bypass the archive, and the meaning of the `_source` and `note` response fields. It does not describe row shape or pagination semantics, which is a minor gap given the schema already documents row_limit and start_row.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds cross-parameter meaning the schema does not: the stable-past/search_type=web/data_state=final conjunction that selects the archive path, and the rule that page/country/device breakdowns outside Google's ~16-month window fall back to archived figures. That interaction-level context is genuinely additive, though individual parameter syntax is left entirely to the schema.

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 ("Query Search Console analytics for a property") and immediately explains the read-through cache path, which distinguishes it from a pure archive tool. It never names a sibling such as search_analytics_archive or get_search_by_page_query, so the differentiation is implicit rather than explicit.

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?

Gives concrete conditions that determine behavior: stable-past range + complete archive coverage + search_type=web + data_state=final routes to the archive, otherwise to Google, and page/country/device breakdowns without query go to Google within the ~16-month window. It explains the routing context clearly but offers no explicit "use this instead of X" guidance and no statement of when not to use the tool at all.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.