All docs
Reference

Tag Manager tools: every read and write tool the agent and MCP can call

TL;DR

17 read and 19 write tools. Read and write support for the operations listed.

Support and limitations

  • Read and write support for the operations listed.
  • Permissions: the connected login's role and the permissions it granted decide what each tool can read or change. A tool the login cannot use answers with what is missing; it never works around it.
  • Approvals: in the app, changes wait for approval unless the task runs with auto-approve. Over MCP and REST they follow the credential's setting (an API key applies ordinary changes at once unless it is set to require approval; a third-party OAuth connection waits). 6 writes are marked “Person approves”: they wait for a person on every lane — only the workspace's own OAuth app and an API key an admin set to apply changes you can't take back skip that wait. Forbidden Rules can block any of them.
  • Publishing a workspace needs a Google permission still in review, so it is not available to every workspace.
  • Operations the platform's API does not offer, and operations not in the catalog, are not available through these tools.

Read tools (17)

ToolWhat it does
gtm__list_containersList GTM containers under the connected account (path, GTM-XXXX public id, name, usageContext)
gtm__list_workspacesList the connected container's workspaces (drafts)
gtm__list_tagsList tags in a workspace (DRAFT state) — name, type, parameters, firing triggers.
gtm__list_triggersList triggers in a workspace — name, type, filters.
gtm__list_variablesList variables in a workspace — name, type, parameters.
gtm__get_live_versionThe PUBLISHED live container version (what actually runs on the site): version id + tag/trigger/variable counts + tag names
gtm__raw_getRAW Tag Manager API v2 read — for anything the typed tools above do not cover (container VERSIONS and version history, environments, folders, built-in…
gtm__get_workspace_statusPending DRAFT changes of the workspace vs its base version (tags, triggers, variables, built-ins, templates, clients, zones, folders) with change type, code…
gtm__get_containerThe container itself: usageContext (is this a SERVER container?), taggingServerUrls (the sGTM endpoint a web container sends to), domain, tag ids.
gtm__list_clientsServer-container CLIENTS — the entry points that claim an incoming request and turn it into an event (GA4, Measurement Protocol, custom).
gtm__list_templatesCustom TEMPLATES in the workspace — the sandboxed JS behind a bespoke tag, client or variable, with gallery provenance.
gtm__list_transformationsServer-only TRANSFORMATIONS — they rewrite event data on the way to tags.
gtm__list_user_permissionsWho can access the Tag Manager account: address, account permission (user / admin), container permissions (read / edit / approve / publish).
gtm__list_versionsThe container's VERSIONS (newest first) with tag / trigger / variable counts and which one is LIVE.
gtm__list_environmentsThe container's ENVIRONMENTS (Live, Latest, staging / QA) and the version each serves.
gtm__get_gallery_templateA Community Template Gallery template BEFORE importing it: name, where it runs (WEB / SERVER), the PERMISSIONS it asks for (send pixels, inject scripts,…
gtm__preview_workspaceDoes the workspace DRAFT compile?

Write tools (19)

A write marked “Person approves” waits for a person on every lane; the others follow the approval setting of the app or the credential.

ToolApprovalWhat it does
gtm__create_tagApproval settingCreate a tag in the workspace (DRAFT — not live until publish_workspace).
gtm__update_tagApproval settingUpdate a workspace tag (full-resource merge).
gtm__update_triggerApproval settingUpdate a workspace TRIGGER (DRAFT): conditions merged BY VARIABLE unless replaceConditions; parameter merged by key; type immutable (state the stored one);…
gtm__enable_built_in_variablesApproval settingEnable built-in variables.
gtm__disable_built_in_variablesApproval settingDisable built-in variables in the workspace (DRAFT); refused while a tag / trigger / variable references.
gtm__create_triggerApproval settingCreate a trigger in the workspace (DRAFT).
gtm__create_variableApproval settingCreate a variable in the workspace (DRAFT).
gtm__create_clientApproval settingCreate a server-container CLIENT in the workspace (DRAFT — claims nothing until publish_workspace).
gtm__update_clientApproval settingUpdate a workspace CLIENT (read-modify-write: fields you omit are carried over, never blanked) and return before/after.
gtm__create_templatePerson approvesCreate a custom TEMPLATE from sandboxed-JS source in the workspace (DRAFT).
gtm__update_templateApproval settingUpdate a custom TEMPLATE's name or sandboxed-JS source (omitted fields carried over) and return before/after sizes.
gtm__update_variableApproval settingUpdate a workspace VARIABLE (type is immutable and carried over; omitted parameters kept) and return before/after.
gtm__create_user_permissionPerson approvesGive a person access (accountPermission user — admin is never granted by the agent; containerPermission read/edit/approve/publish = that permission on the…
gtm__update_user_permissionPerson approvesChange a person's account / container permissions; never an admin or the connection's own login.
gtm__delete_user_permissionPerson approvesRemove a person from the Tag Manager account; never an admin or the connection's own login.
gtm__import_gallery_templatePerson approvesImport a Community Template Gallery template into the workspace DRAFT (templates:import_from_gallery), pinned to the sha get_gallery_template showed.
gtm__sync_workspaceApproval settingBring the workspace DRAFT up to the latest container version (workspaces:sync).
gtm__revert_workspace_changeApproval settingUndo ONE pending DRAFT change (the entity returns to the version the workspace is based on; a draft-only entity leaves the draft).
gtm__publish_workspacePerson approvesIRREVERSIBLE-CLASS: create a version from the workspace AND publish it LIVE on every page loading this container.

Authorized raw requests

gtm__raw_request sends a request in Tag Manager's own API format, with the connection's credentials injected and the path bound to the connected account. It needs the tools:raw scope. Reads run at once; a change waits for a person unless the credential is an API key whose raw writes an admin pre-authorized, or the workspace's own OAuth app — except a permanent delete, which always waits for a person, and a call the platform's fences refuse, which is never sent.

Frequently asked questions

How many Tag Manager tools are there?
36: 17 read and 19 write, of which 6 always wait for a person. The list on this page is the complete catalog for Tag Manager.
Can an agent call the Tag Manager API directly?
gtm__raw_request sends a request in Tag Manager's own API format, with the connection's credentials injected and the path bound to the connected account. It needs the tools:raw scope. Reads run at once; a change waits for a person unless the credential is an API key whose raw writes an admin pre-authorized, or the workspace's own OAuth app — except a permanent delete, which always waits for a person, and a call the platform's fences refuse, which is never sent.
Use the Tag Manager tools

Run them through the in-app agent, or call them from Claude, ChatGPT, Codex or Cursor over the hosted MCP server.