Skip to main content
Glama
Akxan
by Akxan

GA4 report

ga_run_report
Read-onlyIdempotent

Create GA4 data reports with metrics, dimensions, filters, and up to four date ranges to analyze traffic, engagement, and conversions for SEO fixes.

Instructions

GA4 Data API report. Common dimensions: date, pagePath, landingPage, sessionDefaultChannelGroup, sessionSource, country, deviceCategory, eventName. Common metrics: sessions, activeUsers, newUsers, screenPageViews, engagementRate, bounceRate, keyEvents, eventCount (more via ga_get_metadata). Optional comparison range, or up to 4 explicit dateRanges. Returns dataQuality when rows were thresholded, sampled or rolled into '(other)'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
offsetNo
endDateNoyesterday
metricsNo
orderByNoSort order. Defaults to first metric descending.
startDateNoYYYY-MM-DD, today, yesterday or NdaysAgo.28daysAgo
dateRangesNoUp to 4 date ranges; overrides startDate/endDate/compare*.
dimensionsNo
propertyIdYesGA4 property ID, e.g. '123456789' (see ga_list_properties).
filterLogicNoHow to join several dimensionFilters.and
currencyCodeNoISO 4217 code for revenue metrics, e.g. 'EUR'. Defaults to the property's currency.
metricFilterNoRaw FilterExpression; overrides metricFilters.
keepEmptyRowsNo
metricFiltersNoAND-ed metric filters (post-aggregation).
compareEndDateNo
dimensionFilterNoRaw FilterExpression; overrides dimensionFilters.
compareStartDateNoSecond range start; adds a dateRange dimension.
dimensionFiltersNoDimension filters, AND-ed unless filterLogic says otherwise.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv0.10.0
    • addedInput schema / properties / currencyCode
      Added value: +{
      +  "description": "ISO 4217 code for revenue metrics, e.g. 'EUR'. Defaults to the property's currency.",
      +  "type": "string"
      +}
    • addedInput schema / properties / dateRanges
      Added value: +{
      +  "description": "Up to 4 date ranges; overrides startDate/endDate/compare*.",
      +  "items": {
      +    "properties": {
      +      "endDate": {
      +        "type": "string"
      +      },
      +      "name": {
      +        "description": "Label shown in the dateRange column; defaults to range_0, range_1…",
      +        "type": "string"
      +      },
      +      "startDate": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "startDate",
      +      "endDate"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 4,
      +  "minItems": 1,
      +  "type": "array"
      +}
    • changedInput schema / properties / dimensionFilters / description
      Previous value: -"AND-ed dimension filters."New value: +"Dimension filters, AND-ed unless filterLogic says otherwise."
    • addedInput schema / properties / dimensionFilters / items / properties / value / description
      Added value: +"Single value, matched with matchType."
    • addedInput schema / properties / dimensionFilters / items / properties / values
      Added value: +{
      +  "description": "Match any value in this list (inListFilter), e.g. 20 page paths. Use instead of value.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "minItems": 1,
      +  "type": "array"
      +}
    • changedInput schema / properties / dimensionFilters / items / required
      Previous value: -[
      -  "field",
      -  "value"
      -]New value: +[
      +  "field"
      +]
    • addedInput schema / properties / filterLogic
      Added value: +{
      +  "default": "and",
      +  "description": "How to join several dimensionFilters.",
      +  "enum": [
      +    "and",
      +    "or"
      +  ],
      +  "type": "string"
      +}
  2. Changed13 schema fields changedv0.5.1
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / compareStartDate / description
      Previous value: -"Optional second date range start; adds a 'dateRange' dimension to rows."New value: +"Second range start; adds a dateRange dimension."
    • changedInput schema / properties / dimensionFilter / description
      Previous value: -"Raw GA4 FilterExpression JSON. Overrides dimensionFilters when given."New value: +"Raw FilterExpression; overrides dimensionFilters."
    • changedInput schema / properties / dimensionFilters / description
      Previous value: -"Simple AND-ed dimension filters."New value: +"AND-ed dimension filters."
    • removedInput schema / properties / dimensionFilters / items / additionalProperties
      Removed value: -false
    • changedInput schema / properties / dimensionFilters / items / properties / field / description
      Previous value: -"Dimension API name, e.g. 'pagePath', 'sessionDefaultChannelGroup', 'country'."New value: +"Dimension API name, e.g. pagePath, country."
    • changedInput schema / properties / metricFilter / description
      Previous value: -"Raw GA4 FilterExpression JSON. Overrides metricFilters when given."New value: +"Raw FilterExpression; overrides metricFilters."
    • changedInput schema / properties / metricFilters / description
      Previous value: -"Simple AND-ed metric filters (applied after aggregation)."New value: +"AND-ed metric filters (post-aggregation)."
    • removedInput schema / properties / metricFilters / items / additionalProperties
      Removed value: -false
    • addedInput schema / properties / offset / maximum
      Added value: +9007199254740991
    • removedInput schema / properties / orderBy / items / 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)."
    • changedInput schema / properties / startDate / description
      Previous value: -"YYYY-MM-DD, 'today', 'yesterday' or 'NdaysAgo'."New value: +"YYYY-MM-DD, today, yesterday or NdaysAgo."
  3. First observedv0.3.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already establish read-only, idempotent, non-destructive behavior, so the bar is lower. The description adds genuinely useful behavioral detail: optional comparison range vs up to 4 explicit dateRanges, and the caveat that dataQuality is returned when rows were thresholded, sampled, or rolled into '(other)'. No contradiction with annotations.

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 three dense, purposeful sentences. Common dimensions and metrics are front-loaded, and every sentence adds value: range options, metadata pointer, and dataQuality warning. There is no filler or 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?

For an 18-parameter read-only tool with no output schema, the description covers the essential invocation surface: valid dimensions/metrics, date-range behavior, and sampling/thresholding warnings. It does not fully document filters, ordering, or return shape, but the schema covers structural details and the core usage is clear enough for an agent to call 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?

With schema description coverage at 61%, the description helps by enumerating valid dimension and metric names and explaining the date-range modes. It does not, however, clarify filter semantics, orderBy behavior, or how comparison parameters map to output, so it only partially compensates for the schema gap.

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 clearly identifies this as a GA4 Data API reporting tool and lists the common dimensions and metrics an agent would need to invoke it. However, it does not explicitly distinguish itself from sibling GA tools like ga_run_pivot_report, ga_run_realtime_report, or ga_compare_periods beyond the generic 'Data API report' framing.

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?

The description implies core GA4 reporting usage and correctly points to ga_get_metadata for discovering more metrics, which is useful routing guidance. But it never explicitly states when to choose this over the pivot, realtime, funnel, or comparison-period siblings, leaving selection largely to inference.

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