Skip to main content
Glama
dhawalshah

google-analytics-mcp

Get Realtime Users

get_realtime_users

Retrieve active user counts from Google Analytics 4 for the last 30 minutes. Use this to monitor current site activity without applying a date range.

Instructions

Get active users in the last 30 minutes from Google Analytics 4.

This uses the Realtime API — a different endpoint from standard reports. Data reflects activity within the last 30 minutes only; no date range applies.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dimensionsNoDimensions to break down by (optional, defaults to ["unifiedScreenName"]) Other useful values: "country", "deviceCategory", "eventName"
property_idYesGoogle Analytics 4 property ID (numeric, e.g., "123456789")

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations provided, the description carries the burden of behavioral disclosure. It discloses the key behavioral trait: it uses the Realtime API and only reflects the last 30 minutes of activity. However, it does not mention potential limitations like data latency, sampling, or that the Realtime API may have different data freshness characteristics, which would be useful for an agent to know.

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 concise and well-structured. It front-loads the core purpose in the first sentence, then adds the key differentiator (Realtime API) and the time-window constraint in the following sentences. Every sentence earns its place with no redundancy.

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?

Given the tool's simplicity (2 params, 1 required) and the presence of an output schema, the description is largely complete. It explains the key behavioral constraint (30-minute window) and the API distinction. It could be more complete by mentioning what the output looks like, but the output schema likely covers that, and the description adequately covers the essential context for an agent to invoke it correctly.

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 description coverage is 100%, so the schema already documents both parameters. The description adds context about the real-time nature but does not add meaning beyond the schema for the parameters themselves. The default dimension value is already in the schema, so the description adds no extra parameter semantics.

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's function: retrieving active users from GA4 within the last 30 minutes. It explicitly distinguishes itself from standard reports by mentioning the Realtime API, which helps differentiate it from siblings like get_active_users and run_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 provides clear context on when to use this tool (for real-time data within the last 30 minutes) and explicitly notes that no date range applies, which is a key usage constraint. However, it does not explicitly name alternative tools or state when not to use it, though the real-time vs. standard distinction implies this.

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