Skip to main content
Glama

Google Ads & Meta Ads

Tag Manager: Create Version

gtm_create_version
Destructive

Save the unpublished changes of one Google Tag Manager workspace as a new container version, named by the user. A version is a frozen snapshot: it is NOT live until published (gtm_publish_version, after the user confirms, or the user in Tag Manager). Lists the workspace's pending changes first, refuses an empty workspace or a merge conflict, and reports Google's compiler error when a version could not be built. Hard to reverse: Google consumes the workspace on success (a replacement with the same name is created) and the version stays in the container's history. Requires the Tag Manager connection's versions 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": {
      "workspace": "<workspace>",
      "name": "<name>"
    },
    "name": "gtm_create_version"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesThe version name, as the user wants it in Tag Manager's version list, e.g. "GA4 purchase event + Ads conversion fix".
notesNoRelease notes shown on the version. Optional.
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.
workspaceYesThe existing Tag Manager workspace to save the draft in, by name or id, as the user named it (gtm_list_workspaces). Ask the user which workspace to use; never pick one yourself. Nothing is published.

Output Schema

NameRequiredDescriptionDefault
changesYesThose changes, up to 30.
numTagsYesTags in the version.
publicIdNoPublic GTM-XXXXXXX id of the container.
publishedYesAlways false: the change is a draft until a version is created and published.
versionIdYesId of the new container version.
versionUrlNoWhere the user reviews the version in Tag Manager.
changeCountYesChanges the workspace held when the version was made.
numTriggersYesTriggers in the version.
versionNameNoIts name.
workspaceIdYesId of the workspace the change was saved in.
numVariablesYesVariables in the version.
workspaceUrlYesWhere the user reviews, previews and publishes the workspace in Tag Manager.
containerNameYesThe container's name.
containerPathYesAPI path of the container, accounts/{a}/containers/{c}.
workspaceNameYesName of that workspace.
newWorkspacePathNoAPI path of the replacement workspace Google created, when it gave one.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

The description adds rich behavioral detail beyond the annotations: it lists pending changes, refuses empty workspaces or merge conflicts, reports compiler errors, consumes the workspace on success, and leaves the version in history. This is especially strong given the destructive, non-idempotent operation.

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?

The description is front-loaded and dense with relevant constraints, with no obvious repetition. It is somewhat long, but nearly every sentence adds operational value.

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?

Given the annotations, full schema coverage, and output schema, the description provides enough context to call the tool correctly. It covers lifecycle, failure modes, permissions, and side effects, which are the key risks for this operation.

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 coverage is 100%, so the input schema already carries parameter meaning. The description reinforces that the version is named by the user and tied to a workspace, but it does not add syntax or selection details beyond the schema.

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 states a specific verb and resource: it saves unpublished workspace changes as a new container version. It also distinguishes the result from a published version, making the tool easy to identify versus gtm_publish_version.

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?

It clearly explains that creating a version does not publish it and points to gtm_publish_version as the follow-up action after user confirmation. It does not exhaustively contrast alternatives, but the main lifecycle distinction is explicit.

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