Tag Manager: Sync Workspace
gtm_sync_workspaceBring 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
| Name | Required | Description | Default |
|---|---|---|---|
| container | No | The 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. | |
| workspace | Yes | The 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
| Name | Required | Description | Default |
|---|---|---|---|
| publicId | No | Public GTM-XXXXXXX id of the container. | |
| conflicts | Yes | Those entities, up to 30. | |
| published | Yes | Always false: the change is a draft until a version is created and published. | |
| syncError | Yes | True when Google could not sync the workspace. | |
| workspaceId | Yes | Id of the workspace the change was saved in. | |
| versionReady | Yes | True when the workspace can now be saved as a version (synced, no conflicts). | |
| workspaceUrl | Yes | Where the user reviews, previews and publishes the workspace in Tag Manager. | |
| conflictCount | Yes | Entities changed both in the workspace and in a later published version. | |
| containerName | Yes | The container's name. | |
| containerPath | Yes | API path of the container, accounts/{a}/containers/{c}. | |
| workspaceName | Yes | Name of that workspace. |