Tag Manager: Publish Version
gtm_publish_versionPublish 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
| Name | Required | Description | Default |
|---|---|---|---|
| confirm | No | false (default): dry run, nothing is published. true: publish — only after the user explicitly confirmed publishing this version id in this conversation. | |
| 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. | |
| version_id | Yes | Id of the container version to publish, from gtm_create_version or gtm_list_versions. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| numTags | Yes | Tags in it. | |
| publicId | No | Public GTM-XXXXXXX id. | |
| verified | Yes | True when the live version read after publishing is the one named. | |
| published | Yes | True when this call published the version. | |
| versionId | Yes | The version named. | |
| numTriggers | Yes | Triggers in it. | |
| versionName | No | Its name. | |
| numVariables | Yes | Variables in it. | |
| containerName | Yes | Container name. | |
| containerPath | Yes | API path of the container. | |
| liveVersionIdAfter | No | Version live after the call (read from Google), when published. | |
| liveVersionIdBefore | No | Version live when the call started. |