Skip to main content
Glama
dienhokhanh

gtm-mcp-server

by dienhokhanh

gtm_update_variable

Destructive

Update selected fields of a Google Tag Manager variable with fingerprint conflict protection, avoiding accidental overwrites in workspace drafts.

Instructions

Safely update selected variable fields with fingerprint conflict protection.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoDisplay name of the variable.
typeNoGTM variable type, e.g. 'v' (Data Layer), 'c' (Constant), or 'jsm' (Custom JavaScript).
notesNo
accountYesName or ID of the GTM account (e.g. 'My Company' or '1234567').
containerYesName, GTM container ID (publicId, e.g. GTM-XXXX), or internal container ID.
parameterNo
workspaceYesWorkspace name or ID. Required for every mutating operation.
variableIdYesID of the variable to update (from gtm_list_variables).
formatValueNo
parentFolderIdNo
enablingTriggerIdNo
disablingTriggerIdNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false, and idempotentHint=false, so the safety profile is covered. The description adds one genuinely new trait not present in annotations: fingerprint conflict protection (optimistic locking). However, it omits what happens on a conflict, whether unspecified fields are preserved, and whether type changes are allowed.

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?

A single front-loaded sentence with zero filler; the key safety concept (fingerprint protection) is placed immediately after the action. Nothing is wasted, though brevity here comes at the cost of detail scored elsewhere.

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

Completeness2/5

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

For a 12-parameter mutation tool with nested objects and a destructive annotation, one sentence is thin. An output schema exists so return values need not be described, but the description says nothing about conflict resolution, merge behavior, or variable-type specifics for a tool that edits deeply nested variable configuration.

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 50% across 12 parameters, so the baseline is 3. 'Selected variable fields' usefully signals partial-update semantics (only supplied fields change), which the schema does not state, but the complex parameter/parameter-array, formatValue, and enabling/disablingTriggerId inputs get no explanation beyond the schema.

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?

States a specific verb+resource ('update ... variable fields') plus a scope qualifier ('selected fields'), so the operation is unambiguous. It does not distinguish itself from siblings like gtm_create_variable, gtm_revert_variable, or gtm_delete_variable, which an agent must infer from the name alone.

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

Usage Guidelines2/5

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

There is no guidance on when to use this tool versus create/revert/delete, nor any stated prerequisites such as needing a workspace or a fresh fingerprint. The only implicit signal is 'update', leaving routing decisions entirely to the agent.

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