ga4_get_metadata
Get GA4 Dimensions & Metrics
Ga4Description
List the dimensions and metrics available on a GA4 property (including custom definitions), so ga4_run_report calls use valid API names instead of guessing. A property can expose hundreds of dimensions and metrics combined, so results are paginated — use the search parameter to narrow down first. Args: property_id (string, required): GA4 property ID (numeric) or full resource name. search (string, optional): Case-insensitive substring filter on API name / UI name (e.g. 'channel', 'revenue'). Omit to list everything. limit (number, optional): Max dimensions+metrics per page (default 100, max 500). cursor (string, optional): Opaque pagination cursor from a previous response's top-level nextCursor. Do not construct by hand. Returns: data — dimensions and metrics combined, each tagged kind: 'dimension'|'metric', with api_name, ui_name, category, metric_type (metrics only), and custom flag. count (total matches before pagination) and nextCursor (present only when another page exists).
Usage
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "ga4_get_metadata",
"arguments": {
"property_id": "123456789",
"search": "revenue",
"reason": "Find valid revenue metric API names"
}
}
}
hopkin ga4 metadata
| Flag | Type | Required | Description |
|---|---|---|---|
--property-id | string | Required | GA4 property ID (numeric) or full resource name. |
--search | string | Optional | Case-insensitive substring filter on API name / UI name (e.g. 'channel', 'revenue'). Omit to list everything. |
--limit | integer | Optional | Max dimensions+metrics per page (default 100, max 500). |
--cursor | string | Optional | Opaque pagination cursor from a previous response's top-level nextCursor. Do not construct by hand. |
--connection-id | string | Optional | Optional ID of a specific connection to use for this call. Omit to use the actor's default connection for this network. Call <platform>_list_connections to discover available connection IDs. |
{
"mcpServers": {
"ga4": {
"url": "https://ga4.mcp.hopkin.ai",
"transport": "sse"
}
}
}
- Search revenue metrics
- List everything
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
property_id |
string |
Required | GA4 property ID (numeric) or full resource name.minLength: 1 |
reason |
string |
Required | Why this tool call is neededminLength: 1, maxLength: 500 |
Optional parameters (4)
| Name | Type | Required | Description |
|---|---|---|---|
search |
string |
Optional | Case-insensitive substring filter on API name / UI name (e.g. 'channel', 'revenue'). Omit to list everything. |
limit |
integer |
Optional | Max dimensions+metrics per page (default 100, max 500).min: 1, max: 500 |
cursor |
string |
Optional | Opaque pagination cursor from a previous response's top-level nextCursor. Do not construct by hand. |
connection_id |
string |
Optional | Optional ID of a specific connection to use for this call. Omit to use the actor's default connection for this network. Call <platform>_list_connections to discover available connection IDs. |
Examples
Search revenue metrics
{
"property_id": "123456789",
"search": "revenue",
"reason": "Find valid revenue metric API names"
}
hopkin ga4 metadata --property-id 123456789 --search revenue
List everything
{
"property_id": "123456789",
"reason": "Full dimension/metric inventory including custom definitions"
}
hopkin ga4 metadata --property-id 123456789