Skip to main content
Glama

QuerySail: Google Analytics

Run a Google Analytics report

run_report
Read-onlyIdempotent

Use this to retrieve Google Analytics 4 data for one property: users, sessions, views, engagement, events, key events, revenue and any other metric, optionally broken down by dimensions such as date, channel, source/medium, landing page, page path, country, device or event name, and narrowed with filters (for example sessions from Organic Search to pages starting with '/blog/'). With no metrics it reports activeUsers, sessions and screenPageViews; with no dates it covers the last 28 days ending yesterday. Dates are in the property's time zone. Returns totals and up to 100 rows per call (default 20); page through with the returned cursor. Rates such as engagementRate are fractions. Google may withhold small values (thresholding) or sample large reports; the result says so. Figures are observed values and do not identify causes. Use list_fields to find custom dimension and metric names. Read-only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cursorNoOpaque cursor from coverage.nextCursor of the previous call with the same arguments.
filtersNoAll filters are combined with AND. A filter on a requested metric is numeric (equals, notEquals, greaterThan, greaterThanOrEqual, lessThan, lessThanOrEqual with a number value); any other field is a dimension filter with a string operator.
metricsNoMetric API names, e.g. 'activeUsers', 'newUsers', 'sessions', 'engagedSessions', 'engagementRate', 'screenPageViews', 'eventCount', 'keyEvents', 'totalRevenue'. Default activeUsers, sessions, screenPageViews.
end_dateNoInclusive end date: YYYY-MM-DD, 'today', 'yesterday' or 'NdaysAgo' (e.g. '28daysAgo'), in the property's time zone. Provide together with start_date.
order_byNoSort order. Default: chronological when grouping by a time dimension such as date, otherwise the first metric, highest first.
row_limitNoRows per call. Default 20, maximum 100.
dimensionsNoDimension API names to group by, e.g. 'date', 'sessionDefaultChannelGroup', 'sessionSource', 'pagePath', 'landingPage', 'country', 'deviceCategory', 'eventName', or custom ones such as 'customEvent:plan'. Omit for totals only.
start_dateNoInclusive start date: YYYY-MM-DD, 'today', 'yesterday' or 'NdaysAgo' (e.g. '28daysAgo'), in the property's time zone. Provide together with end_date.
property_idYesExact property ID from list_properties, e.g. 'properties/123456789'.
connection_idNoOptional: force a specific Google connection when the property is visible to several.
include_totalsNoAlso return totals across all rows. Default true.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
rowsNo
unitsNo
totalsNo
requestNo
coverageNo
propertyNo
freshnessNo
requestIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.