Skip to main content
Glama

QuerySail: Google Analytics

Compare Google Analytics periods

compare_report
Read-onlyIdempotent

Use this when the user asks what changed between two periods, why traffic or conversions went up or down, or which channels, sources, pages or countries gained or lost. Compares metrics for one property between a current period and the previous period (default), the same weekdays a year earlier, or custom dates, in one Google request. Returns each metric's totals with absolute and percent change and, with a dimension, the top gainers and losers ranked by change in one metric. With no dates the current period is the last 28 days ending yesterday. Filters apply to both periods. Changes are observed differences and do not identify causes. Read-only.

Input Schema

NameRequiredDescriptionDefault
moversNoGainers and losers to return each. Default 10, maximum 50.
filtersNoAll filters are combined with AND. A filter on a requested metric is numeric (equals, notEquals, greaterThan, greaterThanOrEqual, lessThan, lessThanOrEqual with a number value); any other field is a dimension filter with a string operator.
metricsNoMetric API names to compare. Default activeUsers, sessions, screenPageViews.
rank_byNoMetric to rank movers by. Must be one of metrics. Default the first metric.
end_dateNoCurrent period end: YYYY-MM-DD, 'today', 'yesterday' or 'NdaysAgo' (e.g. '28daysAgo'), in the property's time zone. Provide together with start_date.
dimensionNoOptional breakdown for top gainers and losers, e.g. 'sessionDefaultChannelGroup', 'sessionSourceMedium', 'landingPage', 'country'. Not a time dimension.
compare_toNo'previous_period' (default) is the same number of days immediately before; 'previous_year' is 52 weeks earlier, so weekdays line up; 'custom' uses compare_start_date and compare_end_date.
start_dateNoCurrent period start: YYYY-MM-DD, 'today', 'yesterday' or 'NdaysAgo' (e.g. '28daysAgo'), in the property's time zone. Provide together with end_date.
property_idYesExact property ID from list_properties, e.g. 'properties/123456789'.
connection_idNoOptional: force a specific Google connection when the property is visible to several.
compare_end_dateNoComparison period end for compare_to 'custom'.
compare_start_dateNoComparison period start for compare_to 'custom'.

Output Schema

NameRequiredDescriptionDefault
notesNo
unitsNo
losersNo
totalsNo
gainersNo
requestNo
coverageNo
propertyNo
freshnessNo
requestIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

With readOnlyHint, idempotentHint and destructiveHint already declaring the safety profile, the description goes further: default window when no dates are given (last 28 days ending yesterday), that filters apply to both periods symmetrically, that the work is done in one Google request, and that results are observational rather than causal. That last caveat materially changes how an agent should relay results to a user.

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?

Sentences are ordered by decision value: trigger first, mechanism second, output third, defaults fourth, caveat last. No sentence is redundant with another and none restates structured fields unnecessarily; even 'in one Google request' conveys a cost trait.

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 12-parameter read-only tool with full schema coverage and an existing output schema, the description covers the remaining gaps: defaults, filter scoping, ranking behavior, and result interpretation limits. Return-format detail is minimal because the output schema owns it, which is the right division.

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 description coverage is 100%, so the baseline is 3, but the description still adds semantics the schema does not: the default current period (last 28 days ending yesterday), the shared filter scope across both periods, and that movers are 'ranked by change in one metric' (clarifying rank_by). It stops short of describing the compare_to/custom date interplay beyond labeling.

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 opens with a concrete use trigger and states the verb+resource precisely: compares one property's metrics between a current and a comparison period. The period-comparison framing inherently separates it from run_report, which handles single-period reporting, so an agent can select between them without opening schemas.

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?

It gives explicit when-to-use triggers ('what changed between two periods', 'why traffic or conversions went up or down', 'which channels... gained or lost') and a clear limitation ('Changes are observed differences and do not identify causes'). What it lacks is an explicit named alternative (e.g. run_report for a single-period snapshot), so usage context is clear but not fully routed.

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.