Run GA4 report
run_reportRun a GA4 report via the Data API. Dimensions × metrics over a date range, with optional dimensionFilter/metricFilter (GA4 FilterExpression objects), orderBys, offset pagination, and multiple dateRanges. Example: device usage by page = dimensions [pagePath, deviceCategory], metric [screenPageViews]. GA4 allows at most 4 dateRanges per run_report call - split more into separate calls and combine the results. GA4 counts dimensions referenced in dimensionFilter toward the 9-dimension nested-request limit, on top of the dimensions array - reduce the dimensions requested or simplify the filter. A numericFilter needs its comparison value wrapped as { int64Value: '10' } (string) or { doubleValue: 10.5 }, not a bare number - e.g. { fieldName: 'sessions', numericFilter: { operation: 'GREATER_THAN', value: { int64Value: '10' } } }. A bare value: 10 passes schema validation here but GA4 rejects it at request time with "value is missing from NumericFilter" since it never finds anything under int64Value/doubleValue.
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>"
},
"name": "run_report"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| offset | No | Row offset for pagination. | |
| endDate | No | today | |
| metrics | Yes | e.g. ['screenPageViews','activeUsers'] | |
| orderBys | No | ||
| property | No | GA property id, e.g. 'properties/123'. Defaults to the connection's. | |
| startDate | No | 28daysAgo | |
| dateRanges | No | Overrides startDate/endDate; supports multiple ranges. | |
| dimensions | Yes | e.g. ['pagePath','deviceCategory'] | |
| metricFilter | No | GA4 FilterExpression OBJECT on metrics (not a JSON string). Omit it for no filter; never pass {}. Same shape as dimensionFilter, with numeric values wrapped as { int64Value: '10' }. | |
| keepEmptyRows | No | ||
| dimensionFilter | No | GA4 FilterExpression OBJECT on dimensions (not a JSON string). Omit it for no filter; never pass {}. Needs one of filter, andGroup, orGroup or notExpression at the top level, e.g. { filter: { fieldName: 'pagePath', stringFilter: { matchType: 'CONTAINS', value: '/blog' } } }. |