Skip to main content
Glama

ga4_realtime_report

Generates a Google Analytics 4 realtime report for the last 30 minutes using selected dimensions, metrics, and filters to monitor active users and events as they occur.

Instructions

Realtime report for the last 30 minutes (Data API runRealtimeReport). Realtime has its own, smaller set of fields: dimensions like eventName, platform, country, city, unifiedScreenName, appVersion, minutesAgo; metrics activeUsers, eventCount, screenPageViews, keyEvents. Requires: Google Analytics Data API (analyticsdata.googleapis.com) enabled on the quota project; Lector (Viewer) en la propiedad de GA4. If it fails for access, the error explains how to fix it; ga4_check_access checks everything at once.

Input Schema

NameRequiredDescriptionDefault
limitNo
metricsNoRealtime metric API names
propertyNoSaved property name (see ga4_list_properties). Defaults to the default property.
dimensionsNoRealtime dimension API names
metric_filterNoData API FilterExpression for metrics, e.g. {"filter":{"fieldName":"totalUsers","numericFilter":{"operation":"GREATER_THAN","value":{"int64Value":"100"}}}}
minutes_ago_endNoWindow end, in minutes ago (0 = now)
dimension_filterNoData API FilterExpression for dimensions, e.g. {"filter":{"fieldName":"eventName","stringFilter":{"matchType":"BEGINS_WITH","value":"Checkout_"}}}
minutes_ago_startNoWindow start, in minutes ago (0–29)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.1.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does a solid job: it discloses the 30-minute data window, the two prerequisites (Data API enabled on the quota project, Viewer role on the GA4 property), and that access failures return self-explanatory errors. It omits quota/cost behavior, pagination, and how limit interacts with the returned rows.

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?

Front-loaded with purpose, then field inventory, then prerequisites, then failure behavior — a logical order with no filler. Minor deductions for density and an untranslated Spanish phrase ("Lector (Viewer) en la propiedad de GA4") that sits awkwardly in otherwise English prose.

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?

For an 8-parameter tool with nested filter objects and no output schema, the definition covers purpose, valid field names, auth prerequisites, and error behavior well. The remaining gap is that nothing describes the response shape or row-cap behavior, which matters given there is no output schema to fall back on.

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 coverage is 88%, so the baseline is 3. The description adds genuine value by enumerating the valid realtime dimensions (eventName, platform, country, city, unifiedScreenName, appVersion, minutesAgo) and metrics (activeUsers, eventCount, screenPageViews, keyEvents), which the schema does not list. It says nothing about how minutes_ago_start/minutes_ago_end combine or how the two FilterExpression objects are shaped beyond the schema examples.

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?

States a specific verb and resource with scope: a realtime report over the last 30 minutes via the Data API runRealtimeReport. An agent can immediately tell this is the realtime path rather than a historical report. It stops short of naming ga4_run_report explicitly as the non-realtime counterpart.

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 when this applies (30-minute live window, its own smaller field set) and routes access troubleshooting to ga4_check_access. It does not explicitly exclude historical reporting or point to ga4_run_report / ga4_active_users as the alternatives for overlapping needs.

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