Skip to main content
Glama
MoonEyes

google-ecommerce-mcp

GA4 report

ga4_report
Read-onlyIdempotent

Query Google Analytics 4 for traffic, conversions, or revenue by dimensions over a date range, returning top rows, totals, and metric definitions.

Instructions

Run a Google Analytics 4 report (Data API runReport): traffic, conversions or revenue split by any dimensions over a date range. Returns the top rows ({"rows": [{dimension: value, metric: number}]}), "totals" over every row, "row_count" and "truncated", the unit and definition of each metric under "metrics", the currency, and a "date_range" resolved to calendar dates in the property's timezone with "data_complete". Use ga4_realtime for the last 30 minutes.

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum rows returned (1 to 1000); totals always cover every row
metricsNoGA4 API metric names, e.g. sessions, totalUsers, ecommercePurchases, purchaseRevenue, keyEvents
end_dateNoYYYY-MM-DD, NdaysAgo, yesterday or todayyesterday
client_idNoClient id from clients_list. Required when several clients are registered; empty uses the only client (or the environment variables when there is no client registry)
dimensionsNoGA4 API dimension names, e.g. sessionDefaultChannelGroup, landingPage, sessionSource, yearMonth, itemName
start_dateNoYYYY-MM-DD, NdaysAgo, yesterday or today28daysAgo
property_idNoNumeric GA4 property id, as listed by ga4_properties; empty uses the configured GA4_PROPERTY_ID (or the client's property)
channel_groupNoOptional exact filter on sessionDefaultChannelGroup, e.g. 'Organic Search'; empty for all channels

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.5.0
    • addedInput schema / properties / client_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Client id from clients_list. Required when several clients are registered; empty uses the only client (or the environment variables when there is no client registry)",
      +  "title": "Client Id"
      +}
    • changedInput schema / properties / property_id / description
      Previous value: -"Numeric GA4 property id, as listed by ga4_properties; empty uses the configured GA4_PROPERTY_ID"New value: +"Numeric GA4 property id, as listed by ga4_properties; empty uses the configured GA4_PROPERTY_ID (or the client's property)"
  2. Changed2 schema fields changedv0.3.0
    • changedInput schema / properties / limit / description
      Previous value: -"Maximum rows returned (1 to 1000)"New value: +"Maximum rows returned (1 to 1000); totals always cover every row"
    • addedInput schema / properties / property_id
      Added value: +{
      +  "default": "",
      +  "description": "Numeric GA4 property id, as listed by ga4_properties; empty uses the configured GA4_PROPERTY_ID",
      +  "title": "Property Id",
      +  "type": "string"
      +}
  3. Changed8 schema fields changedv0.1.2
    • addedInput schema / properties / channel_group / description
      Added value: +"Optional exact filter on sessionDefaultChannelGroup, e.g. 'Organic Search'; empty for all channels"
    • addedInput schema / properties / dimensions / description
      Added value: +"GA4 API dimension names, e.g. sessionDefaultChannelGroup, landingPage, sessionSource, yearMonth, itemName"
    • addedInput schema / properties / end_date / description
      Added value: +"YYYY-MM-DD, NdaysAgo, yesterday or today"
    • addedInput schema / properties / limit / description
      Added value: +"Maximum rows returned (1 to 1000)"
    • addedInput schema / properties / limit / maximum
      Added value: +1000
    • addedInput schema / properties / limit / minimum
      Added value: +1
    • addedInput schema / properties / metrics / description
      Added value: +"GA4 API metric names, e.g. sessions, totalUsers, ecommercePurchases, purchaseRevenue, keyEvents"
    • addedInput schema / properties / start_date / description
      Added value: +"YYYY-MM-DD, NdaysAgo, yesterday or today"
  4. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare the safety profile (readOnly, idempotent, openWorld, non-destructive), so the bar is lower, and the description still adds real behavior: results are 'top rows' subject to a limit, totals cover every row regardless, and dates are resolved to the property's timezone with a data_complete flag. That is meaningful operational context beyond the annotations, though permissions/quota behavior is unstated.

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?

Purpose and scope are front-loaded before the return-value details, and the closing alternative-tool sentence is well placed. The return enumeration is long, but with no output schema it earns most of its words.

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?

With no output schema, the description correctly compensates by describing the return shape (rows, totals, row_count, truncated, metrics metadata, currency, date_range). All parameters are optional and documented in the schema, so an agent has enough to call it; only error/permission behavior is missing.

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% and all eight parameters are documented there with defaults and accepted formats, so the schema does the heavy lifting. The description only loosely gestures at metrics/dimensions/date range, adding no format or constraint detail beyond what the schema already provides.

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?

It names a specific verb and resource ('Run a Google Analytics 4 report (Data API runReport)') and states the scope ('traffic, conversions or revenue split by any dimensions over a date range'). It also actively disambiguates from the sibling ga4_realtime, so an agent can tell the two apart without opening a schema.

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?

It gives one explicit routing rule with its selecting condition ('Use ga4_realtime for the last 30 minutes'), which is genuinely useful. It stops short of addressing the other adjacent reporting siblings (ga4_properties, ga4_key_events, gads_query), so there is no full when-not guidance.

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

Deploy Server

Other Tools