Skip to main content
Glama
Akxan
by Akxan

Compare two periods in Search Console

gsc_compare_periods
Read-onlyIdempotent

Compare current and previous period performance in Google Search Console by query, page, country, device, or appearance, with deltas sorting winners and losers by click change.

Instructions

Compare a current and a previous period by query, page, country, device, searchAppearance or date; rows carry deltas, sorted by click change (winners and losers).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topNoHow many winners and losers to return.
filtersNo
siteUrlYesSearch Console property, e.g. 'sc-domain:example.com' (see gsc_list_sites).
rowLimitNoRows fetched per period before joining.
dataStateNo'all' includes fresh, not yet final data (the last 2-3 days).final
dimensionNoWhat to compare. 'date' pairs no keys between the periods, so use it for a day-by-day trend, not for winners/losers.page
currentEndYesCurrent period end: YYYY-MM-DD, today, yesterday or NdaysAgo (data lags 2-3 days).
searchTypeNoweb
previousEndYesPrevious period end: YYYY-MM-DD, today, yesterday or NdaysAgo (data lags 2-3 days).
currentStartYesCurrent period start: YYYY-MM-DD, today, yesterday or NdaysAgo (data lags 2-3 days).
previousStartYesPrevious period start: YYYY-MM-DD, today, yesterday or NdaysAgo (data lags 2-3 days).
aggregationTypeNobyPage vs byProperty changes the reported average position.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.10.0
    • addedInput schema / properties / aggregationType
      Added value: +{
      +  "description": "byPage vs byProperty changes the reported average position.",
      +  "enum": [
      +    "auto",
      +    "byPage",
      +    "byProperty"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / dataState
      Added value: +{
      +  "default": "final",
      +  "description": "'all' includes fresh, not yet final data (the last 2-3 days).",
      +  "enum": [
      +    "final",
      +    "all"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / dimension / description
      Added value: +"What to compare. 'date' pairs no keys between the periods, so use it for a day-by-day trend, not for winners/losers."
    • changedInput schema / properties / dimension / enum
      Previous value: -[
      -  "query",
      -  "page",
      -  "country",
      -  "device"
      -]New value: +[
      +  "query",
      +  "page",
      +  "country",
      +  "device",
      +  "searchAppearance",
      +  "date"
      +]
    • changedInput schema / properties / filters / items / properties / dimension / enum
      Previous value: -[
      -  "query",
      -  "page",
      -  "country",
      -  "device",
      -  "date",
      -  "searchAppearance"
      -]New value: +[
      +  "query",
      +  "page",
      +  "country",
      +  "device",
      +  "searchAppearance"
      +]
    • changedInput schema / properties / siteUrl / description
      Previous value: -"Search Console property, e.g. 'sc-domain:example.com' or 'https://example.com/' (see gsc_list_sites)."New value: +"Search Console property, e.g. 'sc-domain:example.com' (see gsc_list_sites)."
  2. Changed8 schema fields changedv0.5.1
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / currentEnd / description
      Previous value: -"Current period end date: YYYY-MM-DD, 'today', 'yesterday' or 'NdaysAgo' (e.g. '28daysAgo'). Search Console data lags ~2-3 days."New value: +"Current period end: YYYY-MM-DD, today, yesterday or NdaysAgo (data lags 2-3 days)."
    • changedInput schema / properties / currentStart / description
      Previous value: -"Current period start date: YYYY-MM-DD, 'today', 'yesterday' or 'NdaysAgo' (e.g. '28daysAgo'). Search Console data lags ~2-3 days."New value: +"Current period start: YYYY-MM-DD, today, yesterday or NdaysAgo (data lags 2-3 days)."
    • removedInput schema / properties / filters / items / additionalProperties
      Removed value: -false
    • changedInput schema / properties / filters / items / properties / expression / description
      Previous value: -"Value to match. For device use DESKTOP/MOBILE/TABLET; for country use 3-letter ISO code like 'usa', 'chn'."New value: +"Value; device: DESKTOP/MOBILE/TABLET, country: 3-letter code like 'usa'."
    • changedInput schema / properties / previousEnd / description
      Previous value: -"Previous period end date: YYYY-MM-DD, 'today', 'yesterday' or 'NdaysAgo' (e.g. '28daysAgo'). Search Console data lags ~2-3 days."New value: +"Previous period end: YYYY-MM-DD, today, yesterday or NdaysAgo (data lags 2-3 days)."
    • changedInput schema / properties / previousStart / description
      Previous value: -"Previous period start date: YYYY-MM-DD, 'today', 'yesterday' or 'NdaysAgo' (e.g. '28daysAgo'). Search Console data lags ~2-3 days."New value: +"Previous period start: YYYY-MM-DD, today, yesterday or NdaysAgo (data lags 2-3 days)."
    • changedInput schema / properties / siteUrl / description
      Previous value: -"Property URL exactly as shown in Search Console, e.g. 'https://example.com/' or 'sc-domain:example.com'. Use gsc_list_sites to discover it."New value: +"Search Console property, e.g. 'sc-domain:example.com' or 'https://example.com/' (see gsc_list_sites)."
  3. First observedv0.3.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare the operation read-only, idempotent, and non-destructive, covering the safety profile. The description adds meaningful behavioral information by stating that rows carry deltas and that results are sorted by click change into winners and losers. There is no contradiction with the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single compact sentence that front-loads the core behavior and includes dimensions, delta output, and sort order. There is no filler, repetition of annotations, or unnecessary detail.

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 12-parameter tool with no output schema, the description, rich parameter schema, and strong annotations together provide a mostly complete picture. It explains the essential output semantics and the comparison nature, while the schema covers date syntax and the special date-dimension caveat. A short example or explicit note about output columns would make it fully complete, but the current definition is adequate.

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

Parameters3/5

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

Schema description coverage is high at 83%, so the schema already documents parameters like dimension, filters, date syntax, dataState, and aggregationType. The tool description mainly echoes the dimension enum and adds little new parameter-level meaning; it does not clarify top, rowLimit, searchType, or how filters interact with the comparison. Baseline 3 is appropriate.

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?

The description names a specific action (compare), the resource (current vs previous period), the available grouping dimensions (query, page, country, device, searchAppearance, date), and the output behavior (deltas sorted by click change into winners/losers). This is specific enough to distinguish it from single-period tools like gsc_search_analytics and from the GA-specific ga_compare_periods sibling.

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?

The description implies when to use the tool: whenever a period-over-period comparison with winners/losers is needed. However, it does not explicitly state when to prefer this over related siblings such as gsc_search_analytics, gsc_opportunities, or ga_compare_periods, nor does it mention any exclusions or alternatives. The usage context is left mostly to inference.

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