Skip to main content
Glama
scalably-io

Google Analytics 4 MCP

by scalably-io

ga4_run_pivot_report

Read-only

Create a GA4 pivot report with rows, columns, and values for cross-dimensional metric analysis.

Instructions

Run a GA4 pivot report.

pivots: list of pivot specs, each with:

  • field_names: list of dimension names to pivot on

  • limit: max rows per pivot

  • offset: pagination offset

  • order_bys: list of OrderBy dicts (same shape as run_report's order_bys)

  • metric_aggregations: list of TOTAL|MINIMUM|MAXIMUM|COUNT

Use when you want a 2D view: e.g. rows=date, columns=device, values=sessions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pivotsNo
metricsNo
dimensionsNo
date_rangesNo
property_idYes
currency_codeNo
metric_filterNo
keep_empty_rowsNo
dimension_filterNo

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.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is covered. The description adds value beyond annotations by explaining the pivot spec structure (field_names, limit, offset, order_bys, metric_aggregations) and noting that order_bys shares shape with run_report, which is useful behavioral context for constructing valid calls. No contradiction with annotations exists.

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 compact and front-loaded: purpose in the first sentence, a tight structured list of the pivot sub-fields, and a memorable usage example. Every sentence earns its place, and the dense bullet-style format packs meaningful detail without padding.

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?

Given an output schema exists (so return values need no explanation) and annotations carry the safety profile, the description needn't cover much more than the pivot mechanics, which it does well. Minor gaps remain: it doesn't state constraints like maximum pivot count or how pivots interact with the top-level dimensions/metrics parameters, but these are edge details for a moderately complex tool.

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 0% schema description coverage, the description must compensate, but it only explains the pivots parameter in detail. The other eight parameters (metrics, dimensions, date_ranges, filters, currency_code, keep_empty_rows) are left entirely underexplained, relying on GA4 API conventions. The pivots explanation is strong and the run_report order_bys cross-reference helps, but the compensation is partial across the full parameter set.

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 and resource ('Run a GA4 pivot report') and immediately distinguishes it from sibling report tools by introducing the 2D pivot concept. The concrete example 'rows=date, columns=device, values=sessions' makes the tool's unique function unmistakable, separating it from ga4_run_report, ga4_run_realtime_report, and ga4_run_funnel_report.

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 gives an explicit usage trigger: 'Use when you want a 2D view'. This clearly implies the standard report tools are for non-pivoted, one-dimensional tables. It doesn't explicitly name alternatives or exclusion conditions, but the 'use when' framing provides enough routing guidance for an agent to select this tool over its siblings.

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