Skip to main content
Glama

Create a GA4 custom dimension or metric

ga4_create_custom_definition

Create a GA4 custom dimension or custom metric from an event parameter in the selected GA4 property (display name, parameter name, scope, optional unit). The first call returns a preview and changes nothing; it is created only on a second call with confirm=true after the user explicitly agrees in chat.

Input Schema

NameRequiredDescriptionDefault
scopeYes
folderNoClient folder name.
confirmNo
languageNoLanguage of the card (ar for Arabic, en for English).
propertyNoGA4 property ID or property name. Required when multiple AI-enabled properties exist.
descriptionNo
display_nameYes
parameter_nameYes
definition_typeYes
measurement_unitNo

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

A4.1/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false, openWorldHint=true, destructiveHint=false; the description adds the genuinely important behavioral fact that the first invocation is a no-op preview and only confirm=true mutates. That is a meaningful disclosure beyond the annotations, especially given destructiveHint=false could otherwise lull an agent into single-call execution. It stops short of saying whether a created definition can later be removed or edited, and notes no permission requirements.

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

Conciseness5/5

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

Two tightly packed sentences with zero filler, and the most consequential fact, that the first call is a preview that changes nothing, is front-loaded right after the purpose statement. Nothing could be removed without losing information.

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

Completeness3/5

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

For a 10-parameter mutation tool with no output schema, the description covers the risky part well (preview then confirm) but leaves roughly half the parameters unaccounted for, including folder/language card-rendering options and multi-property disambiguation via property. An agent could execute the happy path correctly but would be guessing on the optional parameters.

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 description coverage is only 30% across 10 parameters, so the description needs to compensate and partially does: it explains confirm's meaning through the preview workflow and maps display_name, parameter_name, scope and an 'optional unit' to measurement_unit. But folder, language, description and property get no added meaning beyond their terse schema descriptions, and the dimension/metric distinction tied to definition_type plus measurement_unit applicability (metrics only) is never clarified.

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?

States a specific verb and resource: create a GA4 custom dimension or custom metric from an event parameter in the selected property. The 'custom dimension' vs 'custom metric' framing and the 'from an event parameter' qualifier make it immediately distinguishable from the sibling ga4_custom_definitions (which lists them) and ga4_set_key_event.

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?

Gives strong when-to-use guidance in the form of the two-step protocol: first call previews and changes nothing, creation happens only on a second call with confirm=true after the user explicitly agrees in chat. This is exactly the condition an agent needs to sequence correctly. It does not explicitly name ga4_custom_definitions as the place to check existing definitions first, which is the only real gap.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources