Skip to main content
Glama
Akxan
by Akxan

GA4 period comparison

ga_compare_periods
Read-onlyIdempotent

Compare Google Analytics 4 metrics between two periods with dimension breakdowns, returning per-row changes and period totals.

Instructions

Compare GA4 metrics between a current and a previous period, broken down by dimensions (default: channel group). Returns per-row current/previous/delta/percent change plus period totals. Use it for 'how did organic traffic change vs last month'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoRows returned (sorted by absolute change of the first metric).
metricsNo
currentEndNoyesterday
dimensionsNo
propertyIdYesGA4 property ID, e.g. '123456789' or 'properties/123456789'. Use ga_list_properties to discover it.
previousEndNo29daysAgo
currentStartNo28daysAgo
previousStartNo56daysAgo
dimensionFiltersNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.3.0

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, openWorldHint=true, idempotentHint=true, and destructiveHint=false, covering safety and side-effect semantics. The description adds behavioral context beyond this: it states the output structure ('per-row current/previous/delta/percent change plus period totals') and the default breakdown by dimensions. This is valuable, though it does not mention edge cases like missing data or handling of zero denominators. Given the annotation coverage, this is a solid disclosure.

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 two sentences, front-loaded with the core purpose and output characteristics, followed by a concrete usage example. There is no fluff, and every sentence contributes to the agent's understanding. It is efficiently structured and easy to parse.

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

Completeness2/5

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

With 9 parameters, low schema coverage (22%), and no output schema, the description is incomplete. It does not explain how the four date parameters (currentStart, currentEnd, previousStart, previousEnd) define the two periods, nor does it describe the dimensionFilters object structure or allowed match types. The description leaves significant gaps that an agent must infer or discover by trial, which is risky for a tool with this complexity.

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

Parameters2/5

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

Schema description coverage is only 22% (only propertyId and limit have descriptions). The description does not compensate for the other 7 parameters. It mentions the default dimensions but does not explain metrics, currentStart, previousStart, currentEnd, previousEnd, or dimensionFilters. Parameter names are somewhat self-explanatory (e.g., 'currentStart'), but the description adds minimal semantic value beyond the schema. For a low-coverage schema, the description should carry more explanatory weight; it does not.

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 states a clear purpose: 'Compare GA4 metrics between a current and a previous period, broken down by dimensions'. The verb 'compare' and resource 'GA4 metrics' are specific, and the default dimension (channel group) is mentioned. While it doesn't explicitly contrast with sibling tools like ga_run_report or gsc_compare_periods, the 'GA4' qualifier and comparison focus make its intent distinct enough.

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?

The description provides a concrete use case: 'Use it for "how did organic traffic change vs last month"'. This gives the agent a clear scenario for invoking the tool. However, it does not mention when NOT to use it (e.g., for real-time data or complex custom reports), nor does it reference alternatives like ga_run_report for more flexible queries. It gives a useful but not exhaustive guideline.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Akxan/google-seo-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server