Skip to main content
Glama
Hexagon MCP

Hexagon MCP

by smallware-co

ga4_report

Run read-only GA4 reports on any dimension or metric, such as top pages, channels, or countries, for one property or all accessible properties. Set custom date ranges and limits to analyze traffic data.

Instructions

Run a GA4 report (read-only). Defaults to top pages by views for the last 7 days ending yesterday. Accepts any GA4 Data API dimension and metric names, e.g. sessionDefaultChannelGroup, country, activeUsers. Covers one property, or every property the account can access when propertyId is 'all' or omitted.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "ga4_report"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoRows per property. Default 25.
endDateNoYYYY-MM-DD or relative. Default: yesterday.
metricsNoDefault: screenPageViews, sessions, engagementRate, averageSessionDuration.
startDateNoYYYY-MM-DD or relative like 7daysAgo, yesterday, today. Default: 7daysAgo.
dimensionsNoDefault: ['pagePath'].
propertyIdNoOne numeric GA4 property ID, or 'all' for every accessible property. Default: GA4_PROPERTY_ID from .env if set, otherwise all.
orderByMetricNoMetric to sort by, descending. Default: the first metric.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does disclose the read-only nature, the default time window, and the fan-out behavior when propertyId is 'all' or omitted — genuinely useful. But it says nothing about rate limits, error behavior on invalid dimension/metric names, or pagination/row limits across multiple properties, leaving meaningful behavioral gaps.

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?

Three tight sentences: purpose first, default behavior second, scope and parameter freedom last. No filler and no repetition of obvious schema content.

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

Completeness3/5

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

For a 7-parameter reporting tool with no output schema and no annotations, the description covers inputs well but says little about the returned shape — particularly how results are structured when propertyId is 'all' (per-property grouping, total row limits). Adequate but with a clear gap on what comes back.

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 already 100%, so baseline is 3. The description earns above that by clarifying that metrics and dimensions accept any GA4 Data API name and giving concrete examples (sessionDefaultChannelGroup, country, activeUsers), and by explaining the 'all'/omitted property scope.

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 ('Run a GA4 report') plus the concrete default behavior (top pages by views, last 7 days ending yesterday). The GA4/Data API scoping clearly separates it from siblings like gsc_query and adsense_report.

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 clear context for use: default report mode, arbitrary GA4 dimension/metric selection, and single-property vs 'all'-property scope. It never explicitly rules out alternatives or names a sibling tool, which keeps it below a 5.

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