Skip to main content
Glama

Query Google Search Console search performance

search_console_query
Read-onlyIdempotent

Runs one Google Search Console search performance query for a Hi, Moose project, on the property the user connected in Hi, Moose, and returns the rows plus totals. It takes the same fields as Google's Search Analytics API: startDate, endDate, dimensions (query, page, date, country, device, searchAppearance), searchType, dimensionFilterGroups with Google's six operators, aggregationType, dataState, rowLimit and startRow. Three additions run on the host device. compare (true for the equal window just before, or compareStartDate and compareEndDate) adds each row's previous numbers and the change, and keeps rows that exist in only one period. sortBy and sortDirection order the rows by clicks, impressions, ctr or position, and with a comparison by clicksChange, impressionsChange, ctrChange or positionChange. mergePageFragments adds rows for the same page with a # fragment into the page. For "what dropped", pass compare true, sortBy clicksChange and sortDirection asc. Leave dimensions out for totals only; use dimensions ["date"] for a daily trend. ctr is a fraction (0.042 is 4.2%). position is an average where lower is better. country values are three-letter codes such as usa; device values are DESKTOP, MOBILE and TABLET. Google leaves rare queries out of the rows, so use totals for overall numbers, never the sum of the rows. Days become final about three days later; dataState final leaves out days that are not final. These are Google Search numbers, not AI search. Default 100 rows: ask for what the question needs and page with startRow and the returned nextStartRow. Reads data only; nothing in Search Console changes.

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": {
      "project": "<project>",
      "startDate": "<startDate>",
      "endDate": "<endDate>"
    },
    "name": "search_console_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
sortByNoWhat to order rows by. Default clicks (Google's own order). The four change fields need a comparison.
compareNotrue: compare with the window of the same length just before startDate.
endDateYesLast day, YYYY-MM-DD.
projectYesThe Hi, Moose project, by its name as shown by list_projects. The projectId is also accepted.
rowLimitNoRows to return. Default 100. A result holds about 850 KB; when the rows do not fit, they are cut and nextStartRow says where to continue.
startRowNoRows to skip, for paging. Default 0.
dataStateNofinal (default) is final data only; all includes recent days whose numbers still change.
startDateYesFirst day, YYYY-MM-DD.
dimensionsNoHow to group rows. Leave out for totals only. Each row's keys follow this order.
searchTypeNoWhich search surface (type in Google's API). Default web.
sortDirectionNodesc is largest first, asc is smallest first. Default desc, and asc for position.
compareEndDateNoLast day of a custom comparison window, YYYY-MM-DD. Needs compareStartDate.
aggregationTypeNoHow Google adds up numbers. Leave out unless by-page or by-property numbers are needed.
compareStartDateNoFirst day of a custom comparison window, YYYY-MM-DD. Needs compareEndDate.
mergePageFragmentsNotrue: add rows such as /page#section into /page. Needs the page dimension. Default false.
dimensionFilterGroupsNoFilters, in the shape Google uses. Every filter in every group must match. Regex operators use RE2 syntax.

Output Schema

NameRequiredDescriptionDefault
modeNogoogle-order: one page of rows straight from Google. sorted-on-device: the host device read the rows, then compared, merged or sorted them.
rowsNo
scanNoFor sorted-on-device results: how many rows the host device read from Google. complete false means Google had more rows than were read.
errorNo
jobIdNo
notesNoLimits that apply to this result. Pass the relevant ones on to the user.
rangeNo
sortByNo
statusNodone, failed, pending or running.
totalsNoNumbers for the whole range and filters, from Google, including the rare queries the rows leave out.
filtersNoThe filters that were applied, after validation.
cutToFitNotrue when fewer rows than rowLimit were returned because of the result size limit.
headlineNoOne sentence with the window, sample size and the main numbers.
progressNo
propertyNoThe Search Console property that was queried.
returnedNo
rowLimitNo
startRowNo
createdAtNo
dataStateNo
dataNoticeNo
dimensionsNo
durationMsNo
searchTypeNo
projectNameNo
compareRangeNo
nextStartRowNoPass as startRow, with the same other fields, for the next rows. null when there are no more.
totalsChangeNoCurrent period minus comparison period. A negative clicks or impressions change is a drop; a negative position change is an improvement. position is null when the row was missing from one period.
compareTotalsNo
schemaVersionNoVersion of this result shape. Fields are only added within a version.
sortDirectionNo
googleRequestsNo
aggregationTypeNoHow Google added up the numbers: byPage or byProperty.
mergePageFragmentsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, yet the description still adds substantive behavior: Google omits rare queries from rows so totals must be used for overall numbers, days become final about three days later, a result caps at roughly 850 KB and truncation is signalled by nextStartRow, and comparison keeps rows present in only one period.

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-loaded with the core purpose, then grouped by concern (API fields, host-side additions, usage recipes, data caveats). Dense and mostly earning its length, though 'Reads data only; nothing in Search Console changes' largely repeats readOnlyHint=true and could be trimmed.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 16-parameter analytical query tool with an output schema, the description covers defaults, paging, comparison semantics, filter group behavior, and data-finality caveats. Nothing an agent needs to call it correctly appears to be missing.

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 meaning the schema lacks: ctr is a fraction (0.042 is 4.2%), position is an average where lower is better, country values are three-letter codes like usa, and change sortBy fields require a comparison window.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Runs one Google Search Console search performance query') plus scope ('on the property the user connected'), which cleanly separates it from sibling tools such as search_console_get_status and the visibility_* family.

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 recipes: 'For "what dropped", pass compare true, sortBy clicksChange and sortDirection asc', 'Leave dimensions out for totals only', 'use dimensions ["date"] for a daily trend', plus paging advice. It stops short of naming an explicit alternative tool or stating when not to use this one, so it is strong context rather than full when/when-not routing.

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