Tag Manager tools: every read and write tool the agent and MCP can call
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)
| Tool | What it does |
|---|---|
gtm__list_containers | List GTM containers under the connected account (path, GTM-XXXX public id, name, usageContext) |
gtm__list_workspaces | List the connected container's workspaces (drafts) |
gtm__list_tags | List tags in a workspace (DRAFT state) — name, type, parameters, firing triggers. |
gtm__list_triggers | List triggers in a workspace — name, type, filters. |
gtm__list_variables | List variables in a workspace — name, type, parameters. |
gtm__get_live_version | The PUBLISHED live container version (what actually runs on the site): version id + tag/trigger/variable counts + tag names |
gtm__raw_get | RAW 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_status | Pending DRAFT changes of the workspace vs its base version (tags, triggers, variables, built-ins, templates, clients, zones, folders) with change type, code… |
gtm__get_container | The container itself: usageContext (is this a SERVER container?), taggingServerUrls (the sGTM endpoint a web container sends to), domain, tag ids. |
gtm__list_clients | Server-container CLIENTS — the entry points that claim an incoming request and turn it into an event (GA4, Measurement Protocol, custom). |
gtm__list_templates | Custom TEMPLATES in the workspace — the sandboxed JS behind a bespoke tag, client or variable, with gallery provenance. |
gtm__list_transformations | Server-only TRANSFORMATIONS — they rewrite event data on the way to tags. |
gtm__list_user_permissions | Who can access the Tag Manager account: address, account permission (user / admin), container permissions (read / edit / approve / publish). |
gtm__list_versions | The container's VERSIONS (newest first) with tag / trigger / variable counts and which one is LIVE. |
gtm__list_environments | The container's ENVIRONMENTS (Live, Latest, staging / QA) and the version each serves. |
gtm__get_gallery_template | A Community Template Gallery template BEFORE importing it: name, where it runs (WEB / SERVER), the PERMISSIONS it asks for (send pixels, inject scripts,… |
gtm__preview_workspace | Does 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.
| Tool | Approval | What it does |
|---|---|---|
gtm__create_tag | Approval setting | Create a tag in the workspace (DRAFT — not live until publish_workspace). |
gtm__update_tag | Approval setting | Update a workspace tag (full-resource merge). |
gtm__update_trigger | Approval setting | Update a workspace TRIGGER (DRAFT): conditions merged BY VARIABLE unless replaceConditions; parameter merged by key; type immutable (state the stored one);… |
gtm__enable_built_in_variables | Approval setting | Enable built-in variables. |
gtm__disable_built_in_variables | Approval setting | Disable built-in variables in the workspace (DRAFT); refused while a tag / trigger / variable references. |
gtm__create_trigger | Approval setting | Create a trigger in the workspace (DRAFT). |
gtm__create_variable | Approval setting | Create a variable in the workspace (DRAFT). |
gtm__create_client | Approval setting | Create a server-container CLIENT in the workspace (DRAFT — claims nothing until publish_workspace). |
gtm__update_client | Approval setting | Update a workspace CLIENT (read-modify-write: fields you omit are carried over, never blanked) and return before/after. |
gtm__create_template | Person approves | Create a custom TEMPLATE from sandboxed-JS source in the workspace (DRAFT). |
gtm__update_template | Approval setting | Update a custom TEMPLATE's name or sandboxed-JS source (omitted fields carried over) and return before/after sizes. |
gtm__update_variable | Approval setting | Update a workspace VARIABLE (type is immutable and carried over; omitted parameters kept) and return before/after. |
gtm__create_user_permission | Person approves | Give a person access (accountPermission user — admin is never granted by the agent; containerPermission read/edit/approve/publish = that permission on the… |
gtm__update_user_permission | Person approves | Change a person's account / container permissions; never an admin or the connection's own login. |
gtm__delete_user_permission | Person approves | Remove a person from the Tag Manager account; never an admin or the connection's own login. |
gtm__import_gallery_template | Person approves | Import a Community Template Gallery template into the workspace DRAFT (templates:import_from_gallery), pinned to the sha get_gallery_template showed. |
gtm__sync_workspace | Approval setting | Bring the workspace DRAFT up to the latest container version (workspaces:sync). |
gtm__revert_workspace_change | Approval setting | Undo ONE pending DRAFT change (the entity returns to the version the workspace is based on; a draft-only entity leaves the draft). |
gtm__publish_workspace | Person approves | IRREVERSIBLE-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.
Related pages
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.