Skip to main content
Glama

Google Ads & Meta Ads

Tag Manager: Publish Version

gtm_publish_version
DestructiveIdempotent

Publish one saved Google Tag Manager container version, making it the live configuration of the user's website. The only tool of this server that changes the live site. Two steps: with confirm=false (default) it reads the named version and the version live now and reports what would change, publishing nothing; with confirm=true — set only after the user explicitly confirmed publishing that version id in chat — it publishes that exact version (with its fingerprint, so a version changed since the dry run is refused) and reads the live version again to report the verified result. Never publishes a workspace: create a version first (gtm_create_version). Requires the Tag Manager connection's publishing permission.

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": {
      "version_id": "<version_id>"
    },
    "name": "gtm_publish_version"
  }
}

Input Schema

NameRequiredDescriptionDefault
confirmNofalse (default): dry run, nothing is published. true: publish — only after the user explicitly confirmed publishing this version id in this conversation.
containerNoThe container: its public id (GTM-XXXXXXX), its name, or its API path from gtm_list_containers. May be left out when the connected login reaches exactly one container.
version_idYesId of the container version to publish, from gtm_create_version or gtm_list_versions.

Output Schema

NameRequiredDescriptionDefault
numTagsYesTags in it.
publicIdNoPublic GTM-XXXXXXX id.
verifiedYesTrue when the live version read after publishing is the one named.
publishedYesTrue when this call published the version.
versionIdYesThe version named.
numTriggersYesTriggers in it.
versionNameNoIts name.
numVariablesYesVariables in it.
containerNameYesContainer name.
containerPathYesAPI path of the container.
liveVersionIdAfterNoVersion live after the call (read from Google), when published.
liveVersionIdBeforeNoVersion live when the call started.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false, openWorldHint=true and idempotentHint=true; the description adds genuine context beyond them: dry-run-by-default, fingerprint-based refusal if the version changed since the dry run, a post-publish verification read, and the publishing-permission requirement. It does not explain what the verified result or failure output looks like, but the presence of an output schema lowers that burden. No statement conflicts with the annotations.

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 the core action and the exclusivity claim, then the two-step protocol, then constraints. Dense and nearly every clause carries information, though the middle sentence is long and run-on enough to be worth splitting for scanability.

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

Completeness5/5

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

For a destructive, live-site mutation, the description covers prerequisites (publishing permission, saved version rather than workspace), the safety protocol (dry run, fingerprint refusal), and post-action verification. Return values are covered by the output schema and safety traits by annotations, so nothing an agent needs to call it safely is missing.

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 coverage is 100%, so the baseline is 3, but the description meaningfully sharpens the semantics: it frames confirm as a safety gate tied to explicit user confirmation, explains that version_id must be a saved container version (not a workspace), and notes container may be omitted when the login reaches exactly one container.

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 concrete verb and resource ("Publish one saved Google Tag Manager container version, making it the live configuration") and explicitly differentiates itself from siblings by claiming exclusivity: "The only tool of this server that changes the live site." It also rules out a near-miss action ("Never publishes a workspace"), so an agent can distinguish it from gtm_create_version and the workspace tools without opening any schema.

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

Usage Guidelines5/5

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

Gives an explicit two-mode decision rule: confirm=false (default) for a dry run that publishes nothing, confirm=true only after the user explicitly confirmed that version id in chat. It names the alternative path for workspace changes (create a version first via gtm_create_version) and states the prerequisite of publishing permission.

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