publish_tag_manager_container
Publish the container to the live site destructive
Description
PUBLISH THE CONTAINER — the ONE call in Hermoso that changes what runs on the customer's live website for every visitor, immediately. Tag Manager publishes a VERSION, so the draft workspace becomes a version, then that is published. CALLING IT WITHOUT confirm PUBLISHES NOTHING and is the correct first move: it returns what is live right now, its tag/trigger/variable counts, and exactly what would change, read back from Google. Show the user, get a yes, then call again. THE GATE SCALES WITH THE DAMAGE. A NEVER-published container needs only confirm:true. A container that ALREADY has a live version is replacing something that works, so it additionally needs confirmPublicId set to that container's GTM-XXXXXXX public id. It cannot be guessed; read it from list_tag_manager_containers or from the preview. IT REFUSES, FOR FREE AND WITHOUT PUBLISHING, in four cases you should relay rather than retry: merge conflicts in the workspace (somebody changed the same thing in the container — resolve in Tag Manager first), a workspace with no changes at all, a version Google reports a COMPILER ERROR in, and a container whose public id could not be read. TO UNDO: publish the previous version again (versionPath from list_tag_manager_versions, no workspace involved); rolledBackTo names it. READ verified BEFORE YOU TELL ANYONE IT IS LIVE. It is three-valued: true means the container's live version was re-read and IS the one just published; false means Google accepted it but something else is live, which can be Tag Manager's own read lag and must be reported as unconfirmed; null means the read-back could not run, so it is not known — never report false or null as published. Creating the version DELETES the draft workspace and opens a fresh empty one (id in the reply), so any workspace id you hold is stale. Publishing needs the PUBLISH right on the container (Admin, User Management), separate from Edit; a refusal there is a permission, not a broken connection. 0 credits. Needs Google Tag Manager connected.
Parameters
| Parameter | Type | Description |
|---|---|---|
containerPathrequired | string | the "accounts/<id>/containers/<id>" path from list_tag_manager_containers |
gtmWorkspace | string | Tag Manager workspace id or name; defaults to the Default Workspace |
workspace | string | older name for gtmWorkspace (MCP only) |
versionPath | string | ROLLBACK / RE-PUBLISH: publish this EXISTING version instead of the workspace. From list_tag_manager_versions. Must be a version inside the same container. |
versionName | string | name for the version being created; defaults to a timestamped Hermoso name |
versionNotes | string | notes stored on the version, visible in Tag Manager |
confirm | boolean | REQUIRED to publish. Without it nothing is published and you get the blast-radius report instead. |
confirmPublicId | string | the container's GTM-XXXXXXX public id, REQUIRED when the container already has a live version. Read it from the preview; it cannot be guessed. |
Example call
Every required parameter is shown, filled from the schema where it gives a value and otherwise with a placeholder naming the type. Replace the placeholders with real values. The same call works on the MCP server, the CLI and POST https://app.hermoso.ai/v1/tools/publish_tag_manager_container.
MCP (tools/call)
{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"publish_tag_manager_container","arguments":{"containerPath":"<string>"}}}
CLI
hermoso call publish_tag_manager_container --json '{"containerPath":"<string>"}'
Credits
Credits are spent only on two things: running an AI model (image, video, voice, text, planning, post-production) and Ad Spy research. See Credits & costs.
Related tools
list_tag_manager_containersList the Tag Manager containers shared with this profilelist_tag_manager_versionsTag Manager version historypreview_tag_manager_publishWhat would go live