Skip to main content
Glama

Google Ads & Meta Ads

Tag Manager: Sync Workspace

gtm_sync_workspace
Idempotent

Bring one Google Tag Manager draft workspace up to date with the latest published container version (Tag Manager's Update button). Changes published since the workspace was created are merged in; the workspace's own edits are kept. An entity changed on both sides is reported as a merge conflict with the fields that differ — the user resolves those in Tag Manager, this tool never picks a side. Use it when gtm_create_version or gtm_get_workspace_status reports a workspace behind the live version. Publishes nothing. Requires the Tag Manager connection's editing 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": "gtm_sync_workspace"
  }
}

Input Schema

NameRequiredDescriptionDefault
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
publicIdNoPublic GTM-XXXXXXX id of the container.
conflictsYesThose entities, up to 30.
publishedYesAlways false: the change is a draft until a version is created and published.
syncErrorYesTrue when Google could not sync the workspace.
workspaceIdYesId of the workspace the change was saved in.
versionReadyYesTrue when the workspace can now be saved as a version (synced, no conflicts).
workspaceUrlYesWhere the user reviews, previews and publishes the workspace in Tag Manager.
conflictCountYesEntities changed both in the workspace and in a later published version.
containerNameYesThe container's name.
containerPathYesAPI path of the container, accounts/{a}/containers/{c}.
workspaceNameYesName of that workspace.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations declare non-read-only, idempotent, non-destructive, open-world, but the description adds the behavior that actually matters: it is a merge that preserves local edits, conflicts are reported with differing fields rather than auto-resolved, and nothing is published. It also discloses the prerequisite of the Tag Manager connection's editing permission, which annotations cannot express.

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 Update-button analogy, then merge behavior, then conflict handling, then usage trigger and constraints. Every sentence carries information, though the conflict-handling and no-publish points are stated twice in slightly different phrasing, which is mildly redundant.

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 two-parameter mutation tool with an output schema already present, the description covers the merge model, conflict reporting, permission requirement, and the fact that nothing is published. An agent has everything needed to decide whether to call it and what to tell the user afterward.

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 both container and workspace, including the 'ask the user, never pick one yourself' rule. The description adds no further parameter-level meaning such as id format nuances or what happens when the container is omitted. Baseline 3 is appropriate.

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 gives a specific verb and resource: bring one GTM draft workspace up to date with the latest published container version, explicitly analogized to Tag Manager's Update button. It also states the merge semantics (published changes merged in, workspace edits kept), which distinguishes it from gtm_create_version and gtm_publish_version without needing to open either 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?

It names the exact trigger condition — when gtm_create_version or gtm_get_workspace_status reports a workspace behind the live version — and names both alternatives explicitly. It also states what it does NOT do (publishes nothing, never resolves conflicts itself), which is the exclusion guidance an agent needs.

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