Skip to main content
Glama
dienhokhanh

gtm-mcp-server

by dienhokhanh

gtm_update_tag

Destructive

Update selected fields of an existing Google Tag Manager tag by fetching the current version, merging changes, and checking its fingerprint to avoid overwriting concurrent edits.

Instructions

Safely update selected tag fields by fetching and merging the current tag and checking its fingerprint.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoDisplay name of the tag in GTM.
typeNoGTM tag type id, e.g. 'gaawe' (GA4 event), 'googtag' (Google tag), 'html' (Custom HTML), or 'awct' (Google Ads Conversion Tracking).
notesNo
tagIdYesID of the tag to update (from gtm_list_tags).
pausedNoWhether the tag is inactive.
accountYesName or ID of the GTM account (e.g. 'My Company' or '1234567').
liveOnlyNo
priorityNo
setupTagNo
containerYesName, GTM container ID (publicId, e.g. GTM-XXXX), or internal container ID.
parameterNoParameters in the GTM API format matching the tag type.
workspaceYesWorkspace name or ID. Required for every mutating operation.
teardownTagNo
scheduleEndMsNo
parentFolderIdNo
consentSettingsNo
firingTriggerIdNoTrigger IDs that fire this tag.
scheduleStartMsNo
tagFiringOptionNo
blockingTriggerIdNoTrigger IDs that block this tag.
monitoringMetadataNo
monitoringMetadataTagNameKeyNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=true, idempotentHint=false, and openWorldHint=true, so the safety profile is covered. The description adds important behavioral context beyond that: it fetches the current tag, merges selected fields, and checks the fingerprint for concurrency safety. It does not, however, explain permission requirements or what happens to unmentioned fields.

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 that states the action and the safety mechanism with no wasted words. Efficient given what it chooses to cover.

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 complex 22-parameter mutation tool with nested objects and only 45% schema coverage, a one-sentence description is insufficient. Although an output schema exists so return values need not be explained, the description omits guidance on the many optional and nested parameters, required identifiers, and failure behavior.

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

Parameters2/5

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

With 22 parameters and only 45% schema description coverage, the description needs to compensate for undocumented parameters but does not. It only broadly says 'selected tag fields' without clarifying which fields are optional, how nested parameter objects map to GTM types, or how fields like setupTag/teardownTag behave.

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 ('update'), resource ('tag fields'), and scope ('selected tag fields'), which clearly distinguishes it from siblings gtm_create_tag, gtm_delete_tag, and gtm_revert_tag. The description also names the update mechanism (fetch, merge, fingerprint check), so an agent knows this is a partial-update operation, not a replace.

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

Usage Guidelines3/5

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

The phrase 'update selected tag fields' implies partial updates as opposed to full replacement, but the description never explicitly states when to use this over gtm_create_tag or gtm_revert_tag, nor does it note prerequisites or exclusions. Usage is implied rather than guided.

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