ga4_run_custom_report
Run custom GA4 reports by specifying any dimensions and metrics to retrieve specific data from Google Analytics 4.
Instructions
Run a fully custom GA4 report with any dimensions and metrics. See https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema for all available names.
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": {
"site": "<site>",
"startDate": "<startDate>",
"endDate": "<endDate>",
"dimensions": "<dimensions>",
"metrics": "<metrics>"
},
"name": "ga4_run_custom_report"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site | Yes | Site name or raw GA4 property ID. | |
| limit | No | Max rows to return (default 50). | |
| endDate | Yes | End date (e.g. '2024-01-31'). | |
| metrics | Yes | Metric names (e.g. ['totalUsers', 'sessions']). | |
| startDate | Yes | Start date (e.g. '2024-01-01'). | |
| dimensions | Yes | Dimension names (e.g. ['pagePath', 'deviceCategory']). | |
| orderByMetric | No | Metric name to sort by descending. |