Skip to main content
Glama

ga4_create_custom_dimension

Registers an event parameter as a GA4 custom dimension so reports can access it as customEvent:. This affects the entire property and only captures data from registration onward.

Instructions

Register an event parameter (for example destination) as a custom dimension so reports can use it as customEvent:. This changes the property for everyone. Data is only available from the day it is registered, not before. Needs the Editor role and the analytics.edit scope. Requires: Google Analytics Admin API (analyticsadmin.googleapis.com) enabled on the quota project; Editor en la propiedad de GA4; OAuth scope analytics.edit. If it fails for access, the error explains how to fix it; ga4_check_access checks everything at once.

Input Schema

NameRequiredDescriptionDefault
scopeNoEVENT
propertyNoSaved property name (see ga4_list_properties). Defaults to the default property.
descriptionNo
display_nameYesName shown in GA4, e.g. "Destination"
parameter_nameYesEvent parameter name exactly as the app sends it, e.g. "destination"

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.1.0

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description has to carry the full behavioral burden and does much of it: property-wide impact ("changes the property for everyone"), no historical backfill ("Data is only available from the day it is registered"), plus required role and OAuth scope. It omits whether the registration can be undone, what is returned on success, and any quota/per-dimension limit.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The first three sentences are front-loaded and earn their place, but the requirements are then stated twice in nearly identical form ("Needs the Editor role and the analytics.edit scope" followed by "Requires: ... Editor en la propiedad de GA4; OAuth scope analytics.edit"), and the untranslated Spanish fragment makes the text inconsistent.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no annotations and no output schema, the definition covers the critical unknowns: authorization prerequisites, property-wide blast radius, and the fact that no prior data is retroactively attributed. What remains missing is the success response (dimension ID/name) and whether the registration is reversible.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 60% and the description adds real meaning for parameter_name (the exact parameter string the app sends, with a "destination" example) and by implication for scope. However, scope's EVENT vs USER enum distinction — a meaningful behavioral difference for reporting — is never explained, and `description` remains undocumented.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Register an event parameter ... as a custom dimension so reports can use it as customEvent:<parameter>" gives a specific verb, resource, and observable effect, including the naming convention it produces. This is clearly distinguishable from the sibling ga4_custom_dimensions, which lists existing ones.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description makes the trigger condition explicit (you want reports to reference the parameter as customEvent:<name>) and points to ga4_check_access for credential verification. It stops short of stating exclusions, e.g. that it should not be used merely to inspect existing dimensions, or that it fails on parameters already registered.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.