Skip to main content
Glama
Akxan
by Akxan

GA4 batch reports

ga_batch_run_reports
Read-onlyIdempotent

Run up to five GA4 standard reports in one API call for the same property, returning tabulated results in order. Specify dimensions, metrics, date ranges, and filters per report to batch analytics queries efficiently.

Instructions

Run up to 5 standard reports in one API call (same property). Each item takes the same fields as ga_run_report's core: dimensions, metrics, startDate, endDate, dimensionFilters, metricFilters, limit, offset. Returns one tabulated result per report, in order.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
reportsYes
propertyIdYesGA4 property ID, e.g. '123456789' (see ga_list_properties).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.10.0
    • addedInput schema / properties / reports / items / properties / dimensionFilters / items / properties / value / description
      Added value: +"Single value, matched with matchType."
    • addedInput schema / properties / reports / items / 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 / reports / items / properties / dimensionFilters / items / required
      Previous value: -[
      -  "field",
      -  "value"
      -]New value: +[
      +  "field"
      +]
    • addedInput schema / properties / reports / items / properties / filterLogic
      Added value: +{
      +  "default": "and",
      +  "description": "How to join this report's dimensionFilters.",
      +  "enum": [
      +    "and",
      +    "or"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / reports / items / properties / metricFilters
      Added value: +{
      +  "description": "AND-ed metric filters (post-aggregation).",
      +  "items": {
      +    "properties": {
      +      "field": {
      +        "description": "Metric API name, e.g. 'sessions'.",
      +        "type": "string"
      +      },
      +      "operation": {
      +        "default": "GREATER_THAN",
      +        "enum": [
      +          "EQUAL",
      +          "LESS_THAN",
      +          "LESS_THAN_OR_EQUAL",
      +          "GREATER_THAN",
      +          "GREATER_THAN_OR_EQUAL"
      +        ],
      +        "type": "string"
      +      },
      +      "value": {
      +        "type": "number"
      +      }
      +    },
      +    "required": [
      +      "field",
      +      "value"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / reports / items / properties / offset
      Added value: +{
      +  "default": 0,
      +  "description": "Skip this many rows (pagination).",
      +  "maximum": 9007199254740991,
      +  "minimum": 0,
      +  "type": "integer"
      +}
  2. Addedv0.5.1

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, and non-destructive, so the description does not need to repeat those. It adds value by disclosing the 'same property' constraint and that results are returned 'in order' per report, which is behavioral context not present in annotations. 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?

Two sentences with no filler. The purpose is front-loaded, the key constraint (same property) is stated early, and the reference to ga_run_report's core is a compact way to convey parameter semantics. Every sentence earns its place.

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 a batch wrapper with an existing single-report sibling, the description is adequate: it states the batching limit, the property constraint, and the return format. It does not detail error handling or partial failure behavior, but the schema documents the report structure. Given the annotations cover safety and the schema covers parameter structure, this is sufficiently complete for an agent to invoke 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?

The description lists the core fields (dimensions, metrics, startDate, endDate, dimensionFilters, metricFilters, limit, offset) and references ga_run_report for their semantics, which helps an agent familiar with that tool. However, schema description coverage is only 50% and the description does not compensate for undocumented fields like name, filterLogic, or matchType. It relies heavily on the schema to fill gaps, which is adequate for a batch wrapper but not exemplary.

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 states a specific verb ('Run'), a resource ('up to 5 standard reports'), and a key constraint ('same property'). It explicitly differentiates from siblings by referencing ga_run_report's core fields and using 'standard reports' to exclude realtime/pivot/funnel variants. The purpose is unambiguous and no sibling could be mistaken for this tool.

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 clearly implies this is for batching multiple standard reports in one call, and by referencing ga_run_report's core it signals the single-report alternative. However, it does not explicitly state 'use this instead of ga_run_report when you need multiple reports' or list when not to use it. The batch intent is clear but exclusion criteria are left to inference.

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