Skip to main content
Glama

Query search analytics

search_analytics_query
Read-only

Runs a Google Search Console Search Analytics query on the site’s connected property: clicks, impressions, CTR and average position, grouped by any dimensions and filtered like the Search Console API. Rows are Google’s raw data. To compare periods, query each period and compare the rows. To leave out site: and other search-operator queries by the rule the insight tools use, add a query filter with excludingRegex "(?i)(?:^|\s)-?(?:site|inurl|allinurl|intitle|allintitle|intext|allintext|related|cache|filetype|ext|before|after):\S". Page through large results with startRow and nextStartRow. When dataState is omitted only final data is returned, which usually leaves out the latest days. With dataState "all" or "hourly_all", metadata.firstIncompleteDate or firstIncompleteHour marks where data is not final yet; metadata is null otherwise.

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

Input Schema

NameRequiredDescriptionDefault
typeNoSearch type.web
endDateNoLast day, YYYY-MM-DD. Defaults to two days ago, as Search Console data lags.
rowLimitNo
startRowNo
dataStateNo"all" includes fresh, not yet final data. The hour dimension requires "hourly_all", which is used when omitted.
projectIdYesSite to act on, from list_sites. Only its connected Search Console property is used.
startDateNoFirst day, YYYY-MM-DD. Defaults to 28 days ending on endDate.
dimensionsNoGroup rows by these, in order. Omit for property totals.
aggregationTypeNo"byProperty" is not allowed when grouping or filtering by page.
dimensionFilterGroupsNo

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

A4/5.0
Behavior5/5

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

Beyond the readOnly/openWorld annotations it discloses the freshness model: omitting dataState returns only final data and usually drops the latest days, while 'all'/'hourly_all' populate metadata.firstIncompleteDate or firstIncompleteHour and metadata is null otherwise. It also flags that rows are Google's raw data and describes how paging works via startRow and nextStartRow. This is exactly the behavioral context annotations cannot carry.

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?

Purpose is front-loaded in the first sentence, followed by task-specific advice in descending order of importance. Six sentences is defensible for a 10-parameter tool, though the long embedded regex makes one sentence heavy and could arguably be deferred to the filter parameter.

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 a complex raw-API tool with no output schema, it covers the pieces an agent would otherwise get wrong: data freshness, pagination, dimension grouping, and filtering. It does not describe the shape of the returned rows or any quota/error behavior, which is the main remaining gap.

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?

With 70% schema coverage the baseline is 3, and the description adds real value: it explains the pagination contract (startRow drives paging, nextStartRow continues it) and the dataState freshness trade-off that the schema only gestures at. It also demonstrates the filter structure through the excludingRegex example, though it says nothing about aggregationType or rowLimit behavior.

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?

The description opens with a specific verb and resource: it runs a Google Search Console Search Analytics query on the connected property and names the returned metrics (clicks, impressions, CTR, average position). It is precise about scope but never explicitly distinguishes itself from similarly named siblings like get_search_performance or get_analytics_performance, leaving the agent to infer the difference.

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?

It gives task-level guidance (query each period separately to compare, add an excludingRegex filter to drop search-operator queries) rather than routing guidance. There is no statement of when to prefer this tool over the sibling performance tools, so the agent still has to guess at the boundary.

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.

Resources