Register GA4 custom dimensions
ga_create_custom_dimensionRegisters GA4 event parameters or user properties as custom dimensions so their values are retained and available in reports; use dryRun to preview existing and new dimensions.
Instructions
Register event parameters (or user properties) as custom dimensions so GA4 keeps their values and reports can use them (customEvent:, customUser:). GA4 discards the values of unregistered parameters and never backfills, so register them as soon as the site starts sending them. Check ga_property_config customDimensions first: a dimension cannot be deleted through the API, only archived in the GA4 UI, and a standard property allows 50 event-scoped and 25 user-scoped. Parameters already registered with the same scope are skipped, not duplicated. dryRun shows what exists and what would be created.
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": {
"propertyId": "<propertyId>",
"dimensions": "<dimensions>"
},
"name": "ga_create_custom_dimension"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dryRun | No | List existing dimensions and the ones that would be created, without creating anything. | |
| dimensions | Yes | Dimensions to register in this property. | |
| propertyId | Yes | GA4 property ID, e.g. '123456789' (see ga_list_properties). |