Skip to main content
Glama
MoonEyes

google-ecommerce-mcp

Plan a GTM variable change

gtm_plan_variable_upsert
Read-only

Plan the creation or update of a Google Tag Manager variable in a non-default workspace, then apply it separately after approval.

Instructions

PLAN (nothing is written): create or update a variable in a non-default workspace of the client's GTM container (fingerprint from gtm_get_variable for an update). Custom JavaScript variables are high risk. Apply with google_apply after the user agreed.

Input Schema

NameRequiredDescriptionDefault
variableYesThe variable as a GTM API object: name, type, parameter [{type, key, value}], notes. For an update pass only the fields to change (the others are kept); output fields (path, ids, fingerprint) may be left in and must match
client_idNoClient id from clients_list. Required when several clients are registered; empty uses the only client
fingerprintNoUpdate only: the fingerprint returned by gtm_get_tag / gtm_get_trigger / gtm_get_variable (required; refused when stale)
variable_idNoNumeric id of the variable to update; empty creates one
workspace_idYesNumeric GTM workspace id (gtm_workspace_status lists them); never the Default Workspace for a change

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.5.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations declare readOnlyHint=true and destructiveHint=false, and the description reinforces this with 'nothing is written'. It adds genuine context beyond the annotations: the fingerprint source, the 'Custom JavaScript variables are high risk' warning, and the required apply-after-consent workflow.

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?

Three short sentences, front-loaded with the critical 'PLAN (nothing is written)' scoping, then update mechanics, then the apply step. No wasted words.

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?

With no output schema, the description still conveys the plan-then-apply workflow and the fingerprint/workspace prerequisites, which is enough for an agent to call it correctly. It does not mention what the resulting plan is or how plan_get/plan_list/rollback_plan relate, a minor gap.

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 100%, so the schema already documents all five parameters, including the variable object shape and fingerprint staleness rule. The description reinforces the fingerprint source and non-default workspace constraint but adds little beyond what the schema already states.

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 action (PLAN, nothing written) plus the resource (a GTM variable) and the scope constraint (non-default workspace of the client's GTM container). It cleanly distinguishes itself from gtm_get_variable and from the tag/trigger upsert siblings by naming the resource.

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?

Points to gtm_get_variable as the source of the fingerprint for updates and names google_apply as the follow-up with the condition 'after the user agreed', which is clear context. It stops short of explicit when-not-to-use exclusions against siblings like gtm_plan_tag_upsert.

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