Skip to main content
Glama
Samarth GTM MCP Server

Samarth GTM MCP Server

Official

ga4_run_report

Run read-only GA4 Data API reports over a date range to verify which configured GTM events actually fire; zero reported activity flags misconfigured tracking.

Instructions

Run a read-only GA4 Data API report for a property over a date range. Returns dimension/metric rows (e.g. event counts by eventName). Useful for reconciling configured GTM/GA4 events against events GA4 actually reports (zero reported activity for a configured event is a red flag). Read-only — never writes. Requires the analytics.readonly scope.

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": {
      "property": "<property>",
      "metrics": "<metrics>"
    },
    "name": "ga4_run_report"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMax rows to return (default 250).
offsetNoRow offset for paging (default 0).
endDateNoEnd date: YYYY-MM-DD, "NdaysAgo", "today", or "yesterday".today
metricsYesMetric names, e.g. ["eventCount","totalUsers"]. At least 1, max 10.
propertyYesGA4 property ID, e.g. "123456789" or "properties/123456789".
startDateNoStart date: YYYY-MM-DD, "NdaysAgo", "today", or "yesterday".7daysAgo
dimensionsNoDimension names, e.g. ["eventName","date"]. Max 9. Omit for a metric-only report.
orderByMetricNoMetric name to order by (descending). Optional.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.497.5
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / offset / maximum
      Added value: +9007199254740991
    • removedInput schema / properties / property / minLength
      Removed value: -1
    • addedInput schema / properties / property / pattern
      Added value: +"^\\s*(properties\\/)?\\d+\\s*$"
  2. First observedv1.0.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does deliver key traits: read-only semantics stated twice, the required analytics.readonly scope, and what the response contains (dimension/metric rows). It omits operational behavior an 8-param reporting call would benefit from, such as quota/rate-limit behavior and how invalid metric or dimension names are surfaced.

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?

Four short sentences, front-loaded with the operation and its result, then usage rationale and constraints. Slight redundancy in restating read-only in both the first and last sentence, but no filler otherwise.

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 8-parameter, no-output-schema reporting tool, the description covers operation, result shape, safety posture, and auth scope — enough to call it correctly. Pagination behavior across limit/offset and quota failure modes are the remaining gaps, but the rich schema offsets most of that.

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 description coverage is 100%, so all eight parameters (dates, dimensions, metrics, limit, offset, orderByMetric, property) are already documented in the schema. The description adds only an illustrative framing ('event counts by eventName'), not new meaning for specific parameters; baseline 3 applies.

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?

States a specific verb and resource ('Run a read-only GA4 Data API report for a property over a date range') and describes the return shape ('Returns dimension/metric rows'). It never names the obvious sibling ga4_run_realtime_report, so the agent must infer that live/realtime reporting lives elsewhere.

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?

Gives a concrete motivating use case — reconciling configured GTM/GA4 events against events GA4 actually reports, with zero activity flagged as a red flag. That is real when-to-use guidance, but there is no when-not guidance and no named alternative for cases this tool does not cover.

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

Deploy Server

Other Tools