Skip to main content
Glama

Draft an Analytics custom dimension

draft_ga4_custom_dimension
Destructive

Draft registering, changing or archiving a GA4 custom dimension, returning a PREVIEW.

Registering makes an event parameter (EVENT scope), a user property (USER) or an ecommerce item parameter (ITEM) reportable as a dimension. Before anything reaches Google the draft refuses a parameter that is already registered, a taken display name and a full property (see list_ga4_custom_definitions), and the preview warns that GA4 fills the dimension only from now on and that parameter_name and scope cannot change later. Update changes display_name, description or (USER scope) disallow_ads_personalization; archive removes it from reports and frees the slot, cannot be undone and needs a double confirmation. Nothing changes until confirm_and_apply applies it. GA4 Admin API (customDimensions).

Google Analytics Data API: https://developers.google.com/analytics/devguides/reporting/data/v1 and Admin API: https://developers.google.com/analytics/devguides/config/admin/v1

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "draft_ga4_custom_dimension"
  }
}

Input Schema

NameRequiredDescriptionDefault
scopeNoEVENT (default), USER or ITEM.EVENT
actionNo"create" (default), "update" or "archive".create
descriptionNoUp to 150 characters. On update, "" clears it.
property_idNoNumeric GA4 property ID, with or without the "properties/" prefix. If empty, uses the default from config.
display_nameNoName shown in GA4; defaults to parameter_name on create.
parameter_nameNoThe event parameter or user property name exactly as sent, e.g. "plan_type". Required for create; identifies the dimension for update and archive.
custom_dimensionNoResource name, instead of parameter_name, for update or archive.
disallow_ads_personalizationNoUSER scope only: keep this dimension out of ads personalization.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations flag destructive and open-world behavior, but the description adds substantial context: the preview warns that GA4 only fills the dimension from now on, that parameter_name and scope cannot change later, and that archiving is irreversible and requires double confirmation. These details go well beyond the safety hints and directly inform an agent's decision-making.

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

Conciseness4/5

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

The main action and preview concept are front-loaded in the first sentence, and subsequent sentences logically cover registration rules, pre-checks, update/archive behavior, and the confirm workflow. It is dense but mostly earns its length; the trailing documentation links are slightly extraneous but not distracting.

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

Completeness5/5

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

For an 8-parameter tool with an output schema and annotations already covering safety, the description fills the important gaps: workflow sequencing, pre-condition checks, irreversibility of archive, and scope-specific update behavior. An agent has everything needed to invoke it correctly without further inquiry.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds cross-parameter semantics: action maps to create/update/archive, update changes display_name, description, or USER-scope disallow_ads_personalization, and archive frees the slot. It clarifies what parameter_name and scope lock in for later operations, improving on the schema's field-level descriptions.

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?

The description opens with a specific verb and resource: 'Draft registering, changing or archiving a GA4 custom dimension, returning a PREVIEW.' It clearly distinguishes the tool's role as a drafting step that does not mutate anything yet, separating it from confirm_and_apply and from sibling drafting tools like draft_ga4_custom_metric.

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

Usage Guidelines5/5

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

It explicitly states what each action does (create/update/archive), when to use which, that nothing changes until confirm_and_apply, and what preconditions are checked before reaching Google (already registered, display name taken, property full). It also points to list_ga4_custom_definitions as the lookup tool, giving clear workflow guidance.

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.