Skip to main content
Glama

Get Google Analytics report

get_analytics_report
Read-only

Query the project's connected Google Analytics 4 property: sessions, users, engagement, key events (conversions) and revenue, broken down by channel, source, landing page, page, device, country or date, with optional period-over-period comparison. This is what happens after the click — use it to see which traffic actually converts, explain traffic drops, and back recommendations with business outcomes. Pair with get_search_console_performance for the before-click half, or use get_landing_page_performance to get both joined per page.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
offsetNoPagination offset.
endDateNoExplicit end (YYYY-MM-DD, property time zone). Use with startDate.
filtersNoAND-combined. Organic only: [{dimension:'sessionDefaultChannelGroup',operator:'equals',expression:'Organic Search'}].
metricsNoDefault ['sessions']. keyEvents are the conversions the site owner marked (leads, calls, purchases); totalRevenue needs ecommerce tracking.
orderByNoSort rows by this metric, descending (default the first metric).
rowLimitNoRows per call (default 100, max 1000). Paginate with offset when hasMore is true.
compareToNoAdd a comparison window. Each metric then gets <metric>_previous and <metric>_change (relative, -0.25 = down 25%). Use previous_period to explain a traffic drop, previous_year to strip out seasonality.
dateRangeNoConvenience window ending yesterday (default last_28_days). Ignored if startDate+endDate are given.
projectIdYesRequired. The HarborRank project ID to scope this call to. Get one from list_projects.
startDateNoExplicit start (YYYY-MM-DD, property time zone). Use with endDate.
dimensionsNoBreak rows down by these. Omit for site totals. ['sessionDefaultChannelGroup'] for channel mix, ['landingPage'] for entry pages, ['date'] for a trend, ['sessionSourceMedium'] for referrers.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
metaNo
rowsNo
reasonNo
endDateNo
hasMoreNo
rowCountNo
startDateNo
connectUrlNo
nextOffsetNo
propertyIdNo
dataQualityNo
propertyNameNo
totalRowCountNo
compareEndDateNo
compareStartDateNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=true, so safety and data-source scope are covered structurally. The description adds the prerequisite that a GA4 property must be connected to the project and that comparisons can be requested, but says nothing about rate limits, quota, or what happens when no property is connected. Adequate but not rich beyond annotations.

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?

Three sentences, front-loaded with the resource and scope, then usage guidance, then sibling routing. Only mild filler ('This is what happens after the click') and every sentence carries routing or semantic value, so it is appropriately sized.

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?

With 11 parameters, full schema description coverage, an output schema, and read-only annotations, the description supplies the intent, routing and prerequisite context an agent needs to select and call it. It does not need to explain return values, and the remaining gap (connection/auth failure behavior) is minor.

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 every parameter including compareTo, rowLimit, filters and dimensions is already documented with examples in the schema. The description restates the breakdown dimensions and period-over-period comparison but adds no syntax or constraint detail the schema lacks, making 3 the correct baseline.

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?

States a specific verb and resource ('Query the project's connected Google Analytics 4 property') and enumerates the exact metric families (sessions, users, engagement, key events, revenue) and breakdown dimensions, so an agent can tell it apart from get_search_console_performance or get_landing_page_performance without opening the schema.

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

Usage Guidelines5/5

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

Explicitly frames when to use it ('what happens after the click — see which traffic actually converts, explain traffic drops, back recommendations with business outcomes') and names two alternatives with the condition that selects each: get_search_console_performance for the before-click half, get_landing_page_performance for the joined view.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.