Skip to main content
Glama

GTM: update variable (staged, never published)

gtm_update_variable
DestructiveIdempotent

Update a user-defined variable IN the managed AdCopilot workspace by variable id (staged, never published).

Only the fields passed change; the rest of the variable is kept, and a
variable edited by someone else in between is refused rather than
overwritten. Each `parameter` entry replaces the parameter with the same
key (the whole list when `type` changes too).

This overwrites the variable's current settings in the AdCopilot
workspace, including one that is live on the site today. The live site
changes only when a person publishes that workspace in Tag Manager, which
AdCopilot cannot do.

Tools revision: d80f65c0.

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": {
      "container": "<container>",
      "variable_id": "<variable_id>"
    },
    "name": "gtm_update_variable"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNo
typeNo
containerYes
parameterNo
variable_idYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, so the bar is lower, yet the description adds substantial behavior beyond them: partial-update semantics (only passed fields change), optimistic concurrency (a concurrently edited variable is refused rather than overwritten), parameter merge-by-key rules, and the blast radius (overwrites settings live on the site today). Nothing here contradicts destructiveHint.

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?

Front-loaded with purpose, then merge semantics, then the overwrite warning, in a logical order with no filler sentences. The 'Tools revision: d80f65c0.' trailer is pure noise, and the live-site warning slightly restates the '(staged, never published)' tag, so it is not perfectly tight.

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?

For a destructive, idempotent mutation with an output schema already covering return values, the description supplies the merge model, conflict handling and publish boundary. The remaining gap is the undocumented `container` argument and how errors surface on conflict, which an agent would still have to infer.

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 description coverage is 0%, so the description must carry the load, and it does for most of the five parameters: variable_id lookup, the null-means-unchanged convention for name/type, and the exact replacement rule for each `parameter` entry including the type-change case. The `container` parameter is never explained, which keeps it from a 5.

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 ('Update a user-defined variable') plus the workspace scope and the key qualifier '(staged, never published)'. That phrase alone separates it from a publish operation and, combined with 'variable', from gtm_update_tag, gtm_update_trigger and gtm_update_folder.

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 '(staged, never published)' qualifier plus the note that the live site changes only when a person publishes tells the agent exactly which context this tool belongs in. It stops short of explicit routing ('use gtm_create_variable if it does not exist'), so a 4 rather than a 5.

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