run_report
Query Google Analytics 4 data using dimensions, metrics, filters, ordering, and paging to produce custom reports within GA4 limits.
Instructions
Query GA4 (max 9 dimensions, 10 metrics, 10,000 rows per call).
Dates are inclusive: YYYY-MM-DD, today, yesterday, or NdaysAgo, in the property timezone. property_id is numeric or properties/123; omission uses GOOGLE_GA4_PROPERTY_ID. Filters use Google's FilterExpression JSON; e.g. {"filter":{"fieldName":"country","stringFilter":{"matchType":"EXACT","value":"Switzerland"}}}. order_bys uses Google OrderBy JSON, e.g. [{"metric":{"metricName":"sessions"},"desc":true}]. Use deterministic order_bys and nextOffset to page. Metrics are numeric strings, never zero-filled when absent. Keep metadata/quota when interpreting data quality and limits.
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": {
"start_date": "<start_date>",
"end_date": "<end_date>",
"metrics": "<metrics>"
},
"name": "run_report"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| offset | No | ||
| account | No | ||
| metrics | Yes | ||
| end_date | Yes | ||
| order_bys | No | ||
| dimensions | No | ||
| start_date | Yes | ||
| property_id | No | ||
| currency_code | No | ||
| metric_filter | No | ||
| keep_empty_rows | No | ||
| dimension_filter | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||