Skip to main content
Glama
rakoo04

analytics-mcp-server

by rakoo04

Run GA4 Realtime Report

ga4_run_realtime_report
Read-onlyIdempotent

Pull current Google Analytics 4 data for the last 30 minutes. Get active users, page views, and other realtime metrics by country, screen, or other dimensions.

Instructions

Run a Google Analytics 4 realtime report, covering roughly the last 30 minutes of activity.

Args:

  • connection (string): Name of a configured Google connection

  • property_id (string): GA4 property ID (from ga4_list_properties)

  • dimensions (string[]): Realtime dimension API names, e.g. ["country", "unifiedScreenName"]

  • metrics (string[]): Realtime metric API names, e.g. ["activeUsers", "screenPageViews"]

  • limit (number): Max rows to return (default 20, max 250)

  • response_format ('markdown' | 'json'): Output format (default: 'markdown')

Note: only a subset of GA4 dimensions/metrics support realtime reporting — see https://developers.google.com/analytics/devguides/reporting/data/v1/realtime-api-schema

Use when: "How many people are on the site right now?" or "What pages are active users viewing at this moment?" Don't use when: You need historical trends (use ga4_run_report instead).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
metricsYes
connectionYes
dimensionsYes
property_idYes
response_formatNomarkdown

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint=true, idempotentHint=true, destructiveHint=false). The description adds valuable behavioral context beyond that: the 30-minute time windowchend, the warning that only a subset of GA4 dimensions/metrics support realtime reporting, and the output format default. This goes beyond annotations without contradicting them.

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 structured with an overview sentence, an args block, a note, and explicit use/don't-use guidance. Each section earns its place, and the front-loaded purpose sentence allows an agent to quickly understand the tool without digging further. The length is justified given the 0% schema coverage and the need to convey realtime-specific constraints.

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?

The description covers all required parameters, defaults, constraints, and gives a pointer to the official realtime API schema for supported dimensions/metrics. It distinguishes from ga4_run_report. The only minor gap is that it doesn't describe the structure of the returned markdown or json report, and since there's no output schema, a brief note on the report shape would make it fully complete.

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 description coverage is 0%, so the description fully compensates by listing every parameter with a plain-language explanation. It clarifies critical semantics such as 'Realtime dimension API names' with examples, limit max/default, and the response_format enum. It even references ga4_list_properties as the source for property_id, giving extra meaning beyond the bare 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 specific verb and resource: 'Run a Google Analytics 4 realtime report.' It also disambiguates from the likely sibling by explicitly framing it as covering 'roughly the last 30 minutes of activity' and later contrasting it with ga4_run_report for historical trends. This leaves no doubt about what the tool does.

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?

The description provides explicit usage guidance with concrete query examples: 'Use when: "How many people are on the site right now?"' and 'Don't use when: You need historical trends (use ga4_run_report instead).' This directly tells an agent when to select this tool over an alternative, meeting the highest bar for this dimension.

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