Skip to main content
Glama
scalably-io

Google Analytics 4 MCP

by scalably-io

ga4_run_report

Read-only

Run Google Analytics 4 standard reports using dimensions, metrics, date ranges, filters, ordering, and pagination. Reports include sampling, threshold, and quota metadata to inform data quality.

Instructions

Run a GA4 standard report. The workhorse tool.

Args: property_id: numeric or 'properties/NNN'. dimensions: list of dimension api_names (e.g. ["country", "deviceCategory", "date"]). Custom dims require 'customEvent:' or 'customUser:' prefixes. metrics: list of metric api_names (e.g. ["activeUsers", "sessions", "totalRevenue"]). date_ranges: list of {start_date, end_date, name?}. Accepts 'YYYY-MM-DD', 'NdaysAgo', 'today', 'yesterday'. Up to 4 ranges. dimension_filter / metric_filter: filter expression dicts. Shapes: {"filter": {"field_name": "country", "string_filter": {"value": "US"}}} {"and_group": {"expressions": [...]}} {"or_group": {"expressions": [...]}} {"not_expression": {...}} order_bys: list of {metric: {metric_name}, desc} or {dimension: {...}}. metric_aggregations: list of TOTAL|MINIMUM|MAXIMUM|COUNT. limit: max rows (hard cap 250000 per response). offset: pagination offset. keep_empty_rows: include rows where all metrics are zero. currency_code: override property default for revenue metrics. cohort_spec / comparisons: advanced specs (see REST docs).

Gotchas surfaced in response.metadata:

  • samplingMetadatas: present if query was sampled (> 10M events scanned)

  • dataLossFromOtherRow: true if high-cardinality dims collapsed into "(other)"

  • schemaRestrictionResponse: active thresholding rules

  • subjectToThresholding: true if user-privacy thresholding dropped rows

propertyQuota always included so the agent can self-throttle.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
offsetNo
metricsNo
order_bysNo
dimensionsNo
cohort_specNo
comparisonsNo
date_rangesNo
property_idYes
currency_codeNo
metric_filterNo
keep_empty_rowsNo
dimension_filterNo
metric_aggregationsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.0.0

TDQS

A4.3/5.0
Behavior5/5

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

Even though readOnlyHint=true already signals safety, the description adds rich behavioral context: it cautions about sampling (>10M events), data loss from high-cardinality dimensions, thresholding, and schema restrictions, and notes that propertyQuota is always included for self-throttling. This goes well beyond the annotations.

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?

The description is long, but justifiably so for a 14-parameter tool with no schema descriptions. It is well-structured with clear 'Args' and 'Gotchas' sections, front-loading the core purpose. A few minor redundancies (e.g., repeating filter shapes) keep it from a 5.

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?

Given that the tool has an output schema and readOnlyHint/openWorldHint annotations, the description covers all pre-call essentials: parameter formats, constraints (hard cap, up to 4 date ranges, required property_id), pagination, and critical response metadata signals. Nothing needed for correct invocation is missing.

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 carries full responsibility for parameter meaning. It documents every one of the 14 parameters with concrete formats, examples, prefixes for custom dimensions, accepted date expressions, filter shape examples, default limits, and advanced spec references. This fully compensates for the empty schema descriptions.

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?

The description opens with 'Run a GA4 standard report. The workhorse tool,' which gives a clear verb and resource. The term 'standard' implicitly distinguishes this from the many sibling run_* tools (pivot, realtime, funnel, access, batch), but it doesn't explicitly name any alternative the way a 5 would.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Calling it 'the workhorse tool' implies it is the default for standard GA4 reporting, but the description gives no explicit when-to-use vs. when-not-to-use guidance and never names alternatives such as ga4_run_pivot_report or ga4_run_realtime_report. An agent must infer usage boundaries from the sibling tool names alone.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/scalably-io/ga4-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server