Skip to main content
Glama
Akxan
by Akxan

GA4 realtime report

ga_run_realtime_report
Read-onlyIdempotent

Pull and analyze Google Analytics 4 data from the last 30 minutes. Filter by dimensions like country, device, or page, and sort by metrics such as active users or events.

Instructions

Real-time (last 30 minutes) GA4 data. Dimensions: country, city, deviceCategory, unifiedScreenName, eventName, minutesAgo. Metrics: activeUsers, screenPageViews, eventCount, keyEvents. Rows are sorted by the first metric unless orderBy says otherwise.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
metricsNo
orderByNoSort order. Defaults to first metric descending.
dimensionsNo
propertyIdYesGA4 property ID, e.g. '123456789' (see ga_list_properties).
filterLogicNoHow to join several dimensionFilters.and
minuteRangesNoWindows inside the last 30 minutes; default is the whole 30 minutes.
dimensionFiltersNoDimension filters, e.g. unifiedScreenName CONTAINS '/tours/'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.10.0
    • addedInput schema / properties / dimensionFilters
      Added value: +{
      +  "description": "Dimension filters, e.g. unifiedScreenName CONTAINS '/tours/'.",
      +  "items": {
      +    "properties": {
      +      "caseSensitive": {
      +        "default": false,
      +        "type": "boolean"
      +      },
      +      "field": {
      +        "description": "Dimension API name, e.g. pagePath, country.",
      +        "type": "string"
      +      },
      +      "matchType": {
      +        "default": "EXACT",
      +        "enum": [
      +          "EXACT",
      +          "BEGINS_WITH",
      +          "ENDS_WITH",
      +          "CONTAINS",
      +          "FULL_REGEXP",
      +          "PARTIAL_REGEXP"
      +        ],
      +        "type": "string"
      +      },
      +      "not": {
      +        "default": false,
      +        "description": "Negate this filter.",
      +        "type": "boolean"
      +      },
      +      "value": {
      +        "description": "Single value, matched with matchType.",
      +        "type": "string"
      +      },
      +      "values": {
      +        "description": "Match any value in this list (inListFilter), e.g. 20 page paths. Use instead of value.",
      +        "items": {
      +          "type": "string"
      +        },
      +        "minItems": 1,
      +        "type": "array"
      +      }
      +    },
      +    "required": [
      +      "field"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / filterLogic
      Added value: +{
      +  "default": "and",
      +  "description": "How to join several dimensionFilters.",
      +  "enum": [
      +    "and",
      +    "or"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / minuteRanges
      Added value: +{
      +  "description": "Windows inside the last 30 minutes; default is the whole 30 minutes.",
      +  "items": {
      +    "properties": {
      +      "endMinutesAgo": {
      +        "default": 0,
      +        "description": "Window end, minutes ago.",
      +        "maximum": 29,
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "name": {
      +        "description": "Label shown in the dateRange column.",
      +        "type": "string"
      +      },
      +      "startMinutesAgo": {
      +        "default": 29,
      +        "description": "Window start, minutes ago (0 = current minute).",
      +        "maximum": 29,
      +        "minimum": 0,
      +        "type": "integer"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "maxItems": 4,
      +  "minItems": 1,
      +  "type": "array"
      +}
    • addedInput schema / properties / orderBy
      Added value: +{
      +  "description": "Sort order. Defaults to first metric descending.",
      +  "items": {
      +    "properties": {
      +      "desc": {
      +        "default": true,
      +        "type": "boolean"
      +      },
      +      "dimension": {
      +        "type": "string"
      +      },
      +      "metric": {
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  2. Changed2 schema fields changedv0.5.1
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / propertyId / description
      Previous value: -"GA4 property ID, e.g. '123456789' or 'properties/123456789'. Use ga_list_properties to discover it."New value: +"GA4 property ID, e.g. '123456789' (see ga_list_properties)."
  3. First observedv0.3.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, openWorldHint, idempotentHint, and destructiveHint, so safety is covered. The description adds behavioral details beyond annotations, such as default sorting by the first metric unless orderBy overrides, and enumerates supported dimensions and metrics.

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 sentences with no fluff. The main purpose is front-loaded, followed by allowed values and sorting behavior. Every sentence adds value.

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 a read-only, idempotent tool with annotations covering safety, the description provides the key dimensions/metrics and default sort. No output schema exists, but the listed fields imply the return shape. The minuteRanges parameter is described in the schema, so nothing critical is missing.

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 63%, leaving some parameters undocumented. The description compensates by listing allowed dimension and metric values, which the schema does not provide as enums. It also reinforces the default sorting behavior mentioned in the orderBy description.

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 clearly states the tool retrieves real-time (last 30 minutes) GA4 data, lists the available dimensions and metrics, and notes default sorting. This distinguishes it from sibling GA tools like ga_run_report (historical) and ga_run_pivot_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?

The description implies usage for real-time data via the 'Real-time (last 30 minutes)' qualifier, which contrasts with historical tools. However, it does not explicitly name alternatives or state when not to use it, leaving some inference required.

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