Skip to main content
Glama
ga4-gsc-mcp

ga4-gsc-mcp

by kkvlabs

GA4 pivot report

run_ga4_pivot_report
Read-onlyIdempotent

Build GA4 pivot tables to compare metrics across dimensions, such as sessions by channel and device, using the Data API.

Instructions

A GA4 pivot table, e.g. sessions by channel down the side and device across the top (Data API runPivotReport).

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": {
      "dimensions": "<dimensions>",
      "metrics": "<metrics>",
      "pivots": "<pivots>"
    },
    "name": "run_ga4_pivot_report"
  }
}

Input Schema

NameRequiredDescriptionDefault
siteNoSite as a domain or Search Console URL, e.g. "example.com" or "sc-domain:example.com". Optional when the credentials see one site.
periodNoNamed date range ending on the last settled day. Default last_28_days.
pivotsYesEach pivot lists dimensions (from dimensions) to lay out together.
metricsYes
end_dateNoEnd date YYYY-MM-DD. Defaults to the last settled day (Search Console lags 2 to 3 days).
dimensionsYes
start_dateNoStart date YYYY-MM-DD. Overrides period.
ga4_propertyNoGA4 property ID (numbers only). Optional: found from the site's web stream when left out.
dimension_filterNoGA4 FilterExpression JSON.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

C2.9/5.0
Behavior2/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint, so the safety profile is covered. The description adds only the underlying API method name, saying nothing about credit/quota cost, property or site resolution behavior, row limits, or response shape beyond what the schema implies.

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?

A single short sentence with the defining example front-loaded and no wasted words. It is a noun-phrase fragment rather than a directive, but nothing is padded or buried.

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

Completeness2/5

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

With nine parameters, a nested pivots object, a filter expression, and mutually overriding date controls (period vs start_date/end_date), one illustrative sentence is thin. It does not explain how period interacts with explicit dates, what a pivot response looks like, or the relationship between site and ga4_property resolution.

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 78%, so the baseline is 3. The one genuine addition is illustrating that the first pivot field runs down the side and the second across the top, which clarifies ordering semantics of pivots.field_names better than the schema's terse note. The remaining eight parameters receive no semantic help from the description.

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 names the resource (a GA4 pivot table) and grounds it with a concrete cross-tab example (sessions by channel down the side, device across the top), plus the underlying API method. An agent can tell this is the cross-tabulation variant rather than the flat report variant, though the sibling tools run_ga4_report and run_ga4_batch_reports are never named or contrasted.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no explicit when-to-use or when-not-to-use guidance, and no alternatives are named despite three closely related GA4 report siblings. The layout example implies the tool is for two-dimensional breakdowns, but the agent must infer that from an illustration rather than a stated condition.

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