Skip to main content
Glama
jabeer4148-ops

google-measurement-mcp

Run a GA4 realtime report

ga4_run_realtime_report
Read-onlyIdempotent

Query Google Analytics 4 realtime data from the last 30 minutes. Provide property ID and metrics to see active users, events, and screen views.

Instructions

Returns activity from roughly the last 30 minutes. Requires the NUMERIC GA4 propertyId (call ga4_list_account_summaries to find it). IMPORTANT: the realtime schema is a SUBSET of the standard reporting schema — 'date', 'sessionSource' and most session-scoped fields are unavailable and will error. Common realtime dimensions: country, city, deviceCategory, unifiedScreenName, eventName. Common realtime metrics: activeUsers, screenPageViews, eventCount. For anything older than 30 minutes use ga4_run_report instead. Read-only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum rows to return. Defaults to 25 to protect the context window. Prefer narrowing the query over raising this.
metricsYesRealtime metric API names, e.g. ['activeUsers','screenPageViews'].
dimensionsNoRealtime dimension API names, e.g. ['country','unifiedScreenName','deviceCategory']. Note the realtime schema is a SUBSET of the standard reporting schema — 'date' and most session-scoped dimensions are unavailable.
propertyIdYesNumeric GA4 property ID, with or without the 'properties/' prefix. Not the G-XXXXXXX measurement ID.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A5/5.0
Behavior5/5

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

Even with readOnly/idempotent annotations, the description adds behavioral details beyond them: the ~30-minute window, the schema-subset failure mode ('date', 'sessionSource' and most session-scoped fields are unavailable and will error), and the numeric-propertyId requirement. These are actionable warnings an agent would not get from annotations or schema alone.

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 front-loaded with the core behavior and contains five focused sentences, each earning its place: the time window, propertyId prerequisite, schema-subset warning, common fields, and the sibling alternative. No filler or repetition.

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 GA4 tool with no output schema, the description covers the parameter requirements, the real-time limitations, the alternative for older data, and the sibling for finding the property ID. There are no missing prerequisites or constraints needed to invoke it correctly; output format can be inferred from the response and is not a blocker to correct use.

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

Parameters5/5

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

Schema already fully documents all four parameters, but the description still adds meaning: it explains how to find propertyId (via ga4_list_account_summaries), warns that only a subset of dimensions is valid, and lists common realtime dimensions and metrics beyond the schema examples. This is meaningful value on top of a 100%-covered schema.

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 clear verb-resource statement: 'Returns activity from roughly the last 30 minutes.' It also distinguishes itself from the closest sibling by saying 'For anything older than 30 minutes use ga4_run_report instead,' so an agent can choose correctly without inspecting 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?

It explicitly states when to use the tool (activity within roughly the last 30 minutes), when not to use it (older activity should use ga4_run_report), and how to find the required property ID via ga4_list_account_summaries. This is strong when/when-not guidance that prevents common errors.

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