Skip to main content
Glama

Quattr

compare_periods

Read-only

Compare one summarized search/SEO result with a prior period — week vs previous week, month-over-month, or "vs last year" — and return per-row deltas and percentage changes. For whole-site clicks, impressions, CTR, or average position versus another period, call search_performance with date_range, metrics, and comparison_range instead. Use this tool only when find_relevant_analysis supplies a dataset and fully-qualified fields. NEVER use this tool when the request asks for a day/week/month/quarter series BY page, country, device, category, intent, query, rank bucket, traffic source, language, or geo; that shape must call gsc_dimensional_trend exactly once with both date_range and comparison_range so both bucketed periods use the same stable entity set.

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": {
      "dataset": "<dataset>",
      "fields": "<fields>",
      "filters": "<filters>",
      "comparison_period": "<comparison_period>"
    },
    "name": "compare_periods"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo
fieldsYesFully-qualified field ids copied from find_relevant_analysis, shaped "<dataset>.<field>". Bare names such as "clicks" or "impressions" are rejected.
sourceNoWhere Google search performance data is read from. Use "bigquery" ONLY when the user explicitly asks for BigQuery as the source AND describe_data_sources reports it available from live customer configuration — it returns far more granular per-query data (privacy-suppressed impressions appear under "[anonymized by google]").default
datasetYesDataset name copied from find_relevant_analysis. Never pass another tool name such as search_performance.
filtersYesMust include a key ending in ".selected_period" set to the selected inclusive date range, for example "<dataset>.selected_period" = "2026-08-01 to 2026-08-31". A ".date" key is not accepted.
comparison_periodYesExplicit date range for the comparison period, e.g. "2026-04-01 to 2026-04-30". INCLUSIVE of both endpoints.
period_filter_prefixNoPrefix of the selected_period filter to swap; defaults to the dataset name

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=false, so safety is covered; the description adds real behavioral context on top: a hard prerequisite on find_relevant_analysis output and the rule that the bucketed-series case must be a single gsc_dimensional_trend call. It does not discuss limits, pagination, or failure behavior beyond what the schema notes, so not a 5.

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 and every sentence carries routing or prerequisite information; nothing is redundant. It is dense and longer than typical, but the length is justified by the three distinct sibling-routing exclusions it must encode.

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?

With no output schema, the description does state the return shape (per-row deltas and percentage changes), plus prerequisites and alternatives, which is enough for correct selection and invocation. Minor gaps remain around the source/bigquery interplay and result limits, which are left to the schema.

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 already 86%, which sets a baseline of 3. The description loosely clarifies comparison_period semantics (WoW/MoM/YoY shapes) but adds no format or syntax detail for limit, source, filters, or period_filter_prefix beyond what the schema states.

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 (compare), resource (one summarized search/SEO result), scope (prior period: WoW, MoM, YoY) and output (per-row deltas and percentage changes). It explicitly differentiates itself from search_performance and gsc_dimensional_trend, so an agent can route without opening sibling schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit when-to-use (find_relevant_analysis supplies dataset and fully-qualified fields), when-not-to-use (NEVER for bucketed series by page/country/device/etc.), and names the exact alternative tools with the arguments to pass instead. Almost nothing is left to inference.

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