Skip to main content
Glama
dhawalshah

google-analytics-mcp

Run Report

run_report

Run customizable Google Analytics 4 reports by selecting metrics, dimensions, date ranges, and filters to retrieve precise analytics data for analysis.

Instructions

Execute a comprehensive Google Analytics 4 report with full customization capabilities.

IMPORTANT: Use STRING ARRAYS for metrics and dimensions, NOT objects!

CORRECT FORMAT:

  • metrics: ["sessions", "totalUsers", "screenPageViews"]

  • dimensions: ["country", "deviceCategory"]

INCORRECT FORMAT (will fail):

  • metrics: [{"name": "sessions"}]

  • dimensions: [{"name": "country"}]

VALID GA4 METRICS:

  • sessions, totalUsers, activeUsers, newUsers

  • screenPageViews, pageviews, bounceRate, engagementRate

  • averageSessionDuration, userEngagementDuration, engagedSessions

  • conversions, totalRevenue, purchaseRevenue

  • eventCount, eventsPerSession

COMMON METRIC MISTAKES:

  • uniquePageviews (not valid) → use screenPageViews

  • pageViews (not valid) → use screenPageViews

  • users (not valid) → use totalUsers or activeUsers

  • sessionDuration (not valid) → use averageSessionDuration

  • conversionsPerSession (not valid) → use eventsPerSession

  • conversionRate (not valid) → calculate manually

VALID GA4 DIMENSIONS:

  • country, city, region, continent

  • deviceCategory, operatingSystem, browser

  • source, medium, campaignName, sessionDefaultChannelGroup

  • pagePath, pageTitle, landingPage

  • date, month, year, hour, dayOfWeek

  • sessionSource, sessionMedium, sessionCampaignName

COMMON DIMENSION MISTAKES:

  • channelGroup (not valid) → use sessionDefaultChannelGroup

  • sessionCampaign (not valid) → use sessionCampaignName

  • campaign (not valid) → use campaignName

SORTING (order_bys) - EXPERIMENTAL:

  • For metrics: [{"metric": {"metricName": "sessions"}, "desc": true}]

  • For dimensions: [{"dimension": {"dimensionName": "country"}, "desc": false}]

  • WARNING: Sorting may fail due to JSON parsing issues. Test without sorting first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoOptional maximum number of rows (default: 100)
offsetNoOptional number of rows to skip (default: 0)
metricsYesArray of metric names as STRINGS (e.g., ["sessions", "totalUsers"])
end_dateYesEnd date in YYYY-MM-DD format (e.g., "2025-01-31")
order_bysNoOptional sorting - see format above
dimensionsNoOptional array of dimension names as STRINGS (e.g., ["country", "deviceCategory"])
start_dateYesStart date in YYYY-MM-DD format (e.g., "2025-01-01")
property_idYesGoogle Analytics 4 property ID (numeric, e.g., "421301275")
metric_filterNoOptional filter for metrics
keep_empty_rowsNoOptional boolean to include empty rows
dimension_filterNoOptional filter for dimensions

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It warns that sorting is 'EXPERIMENTAL' and 'may fail due to JSON parsing issues,' and it details common mistakes that will cause failures. It also clarifies required input formats ('Use STRING ARRAYS... NOT objects') and provides a correction list. This goes beyond a basic description and helps the agent anticipate failure modes. It does not state read-only status or rate limits, but given the operational warnings, it is quite transparent.

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?

The description is long but well-structured with clear sections (IMPORTANT, CORRECT FORMAT, VALID GA4 METRICS, COMMON METRIC MISTAKES, etc.). Each part adds necessary detail for correct usage, and the most critical format warning is front-loaded. It could arguably be trimmed, but for an 11-parameter tool with many pitfalls, the length is justified and the organization is logical.

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 the tool's complexity (11 parameters, no annotations, but an output schema exists), the description covers the core behavior, formatting requirements, valid values, and known failure modes. It does not elaborate on metric_filter or dimension_filter beyond generic schema descriptions, but those are optional and the schema provides basic context. The output schema presumably covers the return structure, so that gap is acceptable. Overall it is quite complete for a complex reporting tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already covers 100% of parameters with descriptions, but the description adds substantial extra semantics: it enumerates valid GA4 metrics and dimensions, flags common invalid aliases, and specifies the exact structure for order_bys. For example, the metrics parameter schema just says 'Array of metric names as STRINGS,' while the description lists which strings are valid and which are not. This significantly enriches parameter meaning beyond the schema, so it earns a 5.

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 states 'Execute a comprehensive Google Analytics 4 report with full customization capabilities,' which gives a specific verb (execute) and resource (GA4 report). It implies it is the general-purpose reporting tool, distinguishing it from sibling tools like get_page_views or get_active_users that target specific metrics. However, it does not explicitly name alternatives or contrast itself with run_funnel_report, so it stops short of a 5.

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?

The description provides extensive guidance on parameter formatting and valid metric/dimension names, but it does not address when to use this tool versus its siblings. There is no mention of 'use this for general reporting, or get_page_views for a quick single metric' or any exclusion conditions. The purpose of 'comprehensive' implies a default choice, but no explicit routing guidance is given, so the agent must infer selection.

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