Skip to main content
Glama
google-seo-mcp
by Akxan

GA4 pivot report

ga_run_pivot_report
Read-onlyIdempotent

Build a GA4 pivot report to cross-tab one dimension against another—such as landing pages by device category—with selected metrics, filters, and row totals.

Instructions

Cross-tab one dimension against another, e.g. landing pages (rows) by device category (columns) with sessions. Simpler than the raw API: give rowDimension, columnDimension and metrics; the tool builds the two pivots and returns a matrix plus row totals.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "propertyId": "<propertyId>"
    },
    "name": "ga_run_pivot_report"
  }
}

Input Schema

NameRequiredDescriptionDefault
endDateNoyesterday
metricsNo
rowLimitNo
rowOffsetNoSkip this many values of the row dimension (pagination).
startDateNo28daysAgo
propertyIdYesGA4 property ID, e.g. '123456789' (see ga_list_properties).
columnLimitNo
filterLogicNoHow to join several dimensionFilters.and
rowDimensionNolandingPage
columnDimensionNodeviceCategory
dimensionFiltersNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.14.0
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedInput schema / properties / rowOffset / maximum
      Removed value: -9007199254740991
  2. Changed5 schema fields changedv0.10.0
    • 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"
      +}
    • addedInput schema / properties / rowOffset
      Added value: +{
      +  "default": 0,
      +  "description": "Skip this many values of the row dimension (pagination).",
      +  "maximum": 9007199254740991,
      +  "minimum": 0,
      +  "type": "integer"
      +}
  3. Addedv0.5.1

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive and openWorld, so safety is covered. The description usefully adds the return shape ('a matrix plus row totals') and that the tool internally builds two pivots, which matters with no output schema, but it says nothing about the row/column limits, quota cost, or how filters affect the matrix.

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 tight sentences: the first defines the operation with a worked example, the second states the simplification and the return shape. Front-loaded and free of filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 11-parameter read tool with no output schema, the definition gives enough to form a first call (dimensions + metrics) and describes the return value. It is incomplete on cardinality limits (rowLimit max 500, columnLimit max 50) and on filter construction, which meaningfully change results.

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 coverage is only 27% across 11 parameters, so the description needs to compensate. It names the three core ones (rowDimension, columnDimension, metrics) and tells the agent these are the minimum to supply, but leaves date range, rowLimit/columnLimit, rowOffset pagination, and dimensionFilters/filterLogic unaddressed.

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?

Names a specific operation (cross-tab one dimension against another) and grounds it with a concrete example (landingPage rows by deviceCategory columns with sessions). That makes it distinguishable in practice from the funnel/realtime report siblings, though it never names an alternative tool, only 'the raw API'.

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?

Usage is implied by the example rather than stated: use this when you want a matrix of two dimensions instead of a flat report. There is no explicit when-not guidance and no named sibling to route against (e.g. ga_run_report for flat queries), so the agent must infer the choice.

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