Skip to main content
Glama
AlexStansfield

gtm-mcp-server

Update GTM Variable

gtm_update_variable
DestructiveIdempotent

Updates an existing Google Tag Manager variable in a workspace, changing only provided fields or replacing the parameters array wholesale.

Instructions

Update an existing variable in a workspace. Only the provided fields are changed; a provided parameters array replaces the existing parameters wholesale.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoNew name for the variable
account_idYesThe GTM account ID
parametersNoNew parameters array (replaces all existing parameters)
variable_idYesThe GTM variable ID to update
container_idYesThe GTM container ID
workspace_idYesThe GTM workspace ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already convey readOnly=false, idempotent=true, and destructive=true. The description adds valuable behavioral context beyond those: partial updates ('Only the provided fields are changed') and wholesale replacement of parameters ('a provided parameters array replaces the existing parameters wholesale'). No contradiction with annotations.

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 tight sentences: the first states the core action and target, the second spells out the two key behavioral rules. No filler, no redundancy, and the most important information is front-loaded.

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?

The description, combined with rich schema annotations and sibling context, fully explains what the tool does and the key caveat about parameter replacement. Missing return-value description is acceptable since no output schema exists, but a note about what the update returns would have added modest completeness.

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?

With 100% schema description coverage the baseline is 3, but the description adds important cross-parameter semantics: omitting optional fields leaves them unchanged, while providing 'parameters' replaces the entire array. This clarifies how the optional parameters interact, going slightly beyond individual schema entries.

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 clearly states 'Update an existing variable in a workspace' with a specific verb and resource, distinguishing it from create/delete/list variable tools and from update_tag/update_trigger siblings. It also clarifies the scope (workspace) without ambiguity.

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 phrase 'Update an existing variable' implies this tool is for modifying an already-created variable, providing clear context versus create/delete variants. It does not explicitly name alternatives or exclusion criteria, but the verb and resource are enough to guide selection among siblings.

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