Skip to main content
Glama
Samarth GTM MCP Server

Samarth GTM MCP Server

Official

ga4_create_custom_dimension

Creates a GA4 custom dimension for a specified property by registering an event, user, or item parameter with a display name; requires write access and confirmation.

Instructions

[GA4 WRITE] Create a custom dimension. Requires GA4_MCP_ENABLE_WRITES=true and confirm=true.

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": {
      "property": "<property>",
      "parameterName": "<parameterName>",
      "displayName": "<displayName>",
      "scope": "<scope>",
      "confirm": "<confirm>"
    },
    "name": "ga4_create_custom_dimension"
  }
}

Input Schema

NameRequiredDescriptionDefault
scopeYesDimension scope.
confirmYesMust be true to apply the change.
propertyYesGA4 property ID, e.g. "123456789" or "properties/123456789".
descriptionNo
displayNameYesUI display name.
parameterNameYesEvent/user/item parameter name to register.
disallowAdsPersonalizationNoIf true, exclude from ads personalization (USER scope).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.497.5
    • removedInput schema / additionalProperties
      Removed value: -false
    • removedInput schema / properties / property / minLength
      Removed value: -1
    • addedInput schema / properties / property / pattern
      Added value: +"^\\s*(properties\\/)?\\d+\\s*$"
  2. Addedv1.421.0
  3. Removedv1.350.0
  4. Addedv1.160.0

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It does disclose the write-gate behavior (env flag plus confirm=true), which is genuine context beyond the schema, but it says nothing about irreversibility, GA4 per-property dimension quotas, or what happens on duplicate parameterName. For a mutation tool with zero annotation coverage that leaves meaningful gaps.

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 short sentences with the operation-class tag and the action front-loaded, then the preconditions. Nothing is padded and the most decision-relevant facts come first.

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?

With 7 parameters, 5 required, no annotations, and no output schema, the definition should say more about outcomes and constraints — e.g., whether the created dimension is immediately active, whether it can be archived later, or what resource is returned. It covers the write gate but not the surrounding lifecycle context an agent needs to call this safely.

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 86%, so the schema already documents property format, scope enum, displayName, parameterName, and disallowAdsPersonalization. The description adds only the confirm=true requirement, which the schema also states, so it contributes essentially nothing beyond the structured fields.

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

Purpose4/5

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

The description gives a specific verb+resource ("Create a custom dimension") and the "[GA4 WRITE]" tag signals the operation class, which distinguishes it from read-side siblings such as ga4_custom_dimensions_list. It stops short of naming how it differs from ga4_create_custom_metric or ga4_update_custom_dimension, so an agent must infer that distinction from the names alone.

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

Usage Guidelines3/5

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

The description states two hard preconditions (GA4_MCP_ENABLE_WRITES=true and confirm=true), which is useful gating guidance for invocation. However, it gives no when-to-use vs. when-not-to-use guidance — nothing about preferring ga4_update_custom_dimension for an existing dimension or using ga4_create_custom_metric for metrics — so usage is only implied by the verb.

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

Deploy Server

Other Tools