samarth-gtm-mcp
v1.19.0Google Tag Manager + read-only GA4 MCP server.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
accounts_list
List all GTM accounts accessible to the authenticated user. Returns account IDs, names, and share-data flags.
| Parameter | Type | Description |
|---|---|---|
includeGoogleTags | boolean | Also include results from the Google Tags accounts. |
accounts_get
Get details of a specific GTM account.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID (numeric string). |
containers_list
List all GTM containers within a GTM account. Automatically follows pagination to return all containers.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
maxPages | integer | Maximum number of API pages to fetch (default 50). If more pages remain, the result includes truncated:true and a nextPageToken. |
pageToken | string | Continuation token to resume listing from a previous truncated result. |
containers_get
Get details of a specific GTM container.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
containerId * | string | The GTM container ID. |
containers_create
[WRITE] Create a new GTM container. Requires GTM_MCP_ENABLE_WRITES=true and confirm=true.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
confirm * | boolean | Must be true to confirm this write operation. |
name * | string | Container name. |
usageContext * | array | Usage context(s) for the container. |
domainName | array | Associated domain names. |
notes | string | Optional notes. |
containers_snippet
Get the GTM installation snippet (HTML/JS tagging code) for a container.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
containerId * | string | The GTM container ID. |
containers_lookup
Look up a GTM container by its linked destination ID (e.g. a GA4 measurement ID or tag ID).
| Parameter | Type | Description |
|---|---|---|
destinationId * | string | The destination/tag ID to look up (e.g. "G-XXXXXXX"). |
containers_combine
[WRITE] Combine (merge) another container into this one. Requires GTM_MCP_ENABLE_WRITES=true and confirm=true. ⚠️ This merges the source container identified by containerIdToCombine into the target container.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
confirm * | boolean | Must be true to confirm this write operation. |
containerId * | string | The target container ID (the surviving container). |
containerIdToCombine * | string | The container ID to merge into the target. |
allowUserPermissionFeatureUpdate | boolean | Allow updating the user-permission feature during combine. |
settingSource | string | Which container's settings to keep. |
containers_move_tag_id
[WRITE] Move a Tag ID out of a container into a new container. Requires GTM_MCP_ENABLE_WRITES=true and confirm=true.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
confirm * | boolean | Must be true to confirm this write operation. |
containerId * | string | The source container ID. |
tagId * | string | The Tag ID to move. |
allowUserPermissionFeatureUpdate | boolean | |
copySettings | boolean | Whether to copy container settings. |
copyTermsOfService | boolean | Whether to copy terms of service. |
copyUsers | boolean | Whether to copy users. |
tagName | string | Name for the new tag created in the destination container. |
destinations_list
List all destinations (linked Google tags / GA4 destinations) for a GTM container.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
containerId * | string | The GTM container ID. |
destinations_get
Get details of a specific GTM destination.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
containerId * | string | The GTM container ID. |
destinationId * | string | The destination ID. |
destinations_link
[WRITE] Link a destination (Google tag / GA4 destination) to a GTM container. Requires GTM_MCP_ENABLE_WRITES=true and confirm=true.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
confirm * | boolean | Must be true to confirm this write operation. |
containerId * | string | The GTM container ID. |
destinationId * | string | The destination ID to link (e.g. "G-XXXXXXX"). |
allowUserPermissionFeatureUpdate | boolean |
workspaces_list
List all workspaces within a GTM container. Automatically follows pagination to return all workspaces.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
containerId * | string | The GTM container ID. |
maxPages | integer | Maximum number of API pages to fetch (default 50). If more pages remain, the result includes truncated:true and a nextPageToken. |
pageToken | string | Continuation token to resume listing from a previous truncated result. |
workspaces_get
Get details of a specific GTM workspace.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
containerId * | string | The GTM container ID. |
workspaceId * | string | The GTM workspace ID. |
workspaces_create
[WRITE] Create a new workspace. Requires GTM_MCP_ENABLE_WRITES=true.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
confirm * | boolean | Must be true to confirm this write operation. |
containerId * | string | The GTM container ID. |
name * | string | Workspace name. |
description | string | Workspace description. |
workspace_get_status
Get the status of a GTM workspace: the list of changed entities (workspaceChange) relative to the latest container version, plus any merge conflicts. Use this to review a change diff before creating a version or publishing.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
containerId * | string | The GTM container ID. |
workspaceId * | string | The GTM workspace ID. |
workspace_sync
Syncs a workspace to the latest container version by updating all unmodified workspace entities. Returns a list of merge conflicts if any.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
confirm * | boolean | Must be true to confirm this operation. |
containerId * | string | The GTM container ID. |
workspaceId * | string | The GTM workspace ID. |
workspace_resolve_conflict
Resolve a merge conflict for a workspace entity. You must supply the full entity body to write into the workspace (overwriting the conflict). NOTE: This is a complex operation — review the GTM UI conflict resolution first.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
confirm * | boolean | Must be true to confirm this write operation. |
containerId * | string | The GTM container ID. |
entityJson * | string | JSON string of the full entity (tag/trigger/variable/folder) to use as the resolved version. |
fingerprint * | string | The workspace fingerprint at the time of conflict resolution. |
workspaceId * | string | The GTM workspace ID. |
tags_list
List all GTM tags in a workspace. Automatically follows pagination to return all tags.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
containerId * | string | The GTM container ID. |
workspaceId * | string | The GTM workspace ID. |
maxPages | integer | Maximum number of API pages to fetch (default 50). If more pages remain, the result includes truncated:true and a nextPageToken. |
pageToken | string | Continuation token to resume listing from a previous truncated result. |
tags_get
Get details of a specific GTM tag.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
containerId * | string | The GTM container ID. |
tagId * | string | The GTM tag ID. |
workspaceId * | string | The GTM workspace ID. |
tags_create
[WRITE] Create a new GTM tag. Requires GTM_MCP_ENABLE_WRITES=true and confirm=true. Pass the full tag configuration as parameters.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
confirm * | boolean | Must be true to confirm this write operation. |
containerId * | string | The GTM container ID. |
name * | string | Tag name. |
type * | string | Tag type (e.g. "ua", "ga4", "html", "img"). |
workspaceId * | string | The GTM workspace ID. |
blockingTriggerId | array | IDs of blocking triggers. |
firingTriggerId | array | IDs of firing triggers. |
notes | string | Optional notes. |
parameter | array | GTM parameter list. For list/map parameters, use the GTM UI or pass via raw JSON update. |
parentFolderId | string | Parent folder ID. |
paused | boolean | Whether the tag is paused. |
tags_update
[WRITE] Update an existing GTM tag. Requires GTM_MCP_ENABLE_WRITES=true and confirm=true. Only the fields provided will be updated (partial update via the API fingerprint).
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
confirm * | boolean | Must be true to confirm this write operation. |
containerId * | string | The GTM container ID. |
tagId * | string | The GTM tag ID to update. |
workspaceId * | string | The GTM workspace ID. |
blockingTriggerId | array | IDs of blocking triggers. |
fingerprint | string | Current tag fingerprint (for optimistic locking). |
firingTriggerId | array | IDs of firing triggers. |
name | string | New tag name. |
notes | string | Optional notes. |
parameter | array | GTM parameter list. For list/map parameters, use the GTM UI or pass via raw JSON update. |
paused | boolean | Whether the tag is paused. |
type | string | New tag type. |
tags_delete
[DELETE] Delete a GTM tag. Requires GTM_MCP_ENABLE_DELETES=true and confirm=true. This is irreversible in the workspace (the tag is removed from the workspace).
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
confirm * | boolean | Must be true to confirm this delete operation. |
containerId * | string | The GTM container ID. |
tagId * | string | The GTM tag ID to delete. |
workspaceId * | string | The GTM workspace ID. |
triggers_list
List all GTM triggers in a workspace. Automatically follows pagination to return all triggers.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | |
containerId * | string | |
workspaceId * | string | |
maxPages | integer | Maximum number of API pages to fetch (default 50). If more pages remain, the result includes truncated:true and a nextPageToken. |
pageToken | string | Continuation token to resume listing from a previous truncated result. |
triggers_get
Get a specific GTM trigger.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | |
containerId * | string | |
triggerId * | string | |
workspaceId * | string |
triggers_create
[WRITE] Create a GTM trigger. Requires GTM_MCP_ENABLE_WRITES=true and confirm=true.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | |
confirm * | boolean | |
containerId * | string | |
name * | string | Trigger name. |
type * | string | Trigger type (e.g. "click", "pageview", "customEvent", "domReady", "windowLoaded", "historyChange", "jsError", "scrollDepth", "elementVisibility", "timer", "youTubeVideo", "formSubmission", "linkClick… |
workspaceId * | string | |
customEventFilter | Used for custom event triggers. | |
eventName | object | Custom event name (for customEvent type). |
filter | array | Conditions that must be met for the trigger to fire. |
notes | string | |
parentFolderId | string |
triggers_update
[WRITE] Update a GTM trigger. Requires GTM_MCP_ENABLE_WRITES=true and confirm=true.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | |
confirm * | boolean | |
containerId * | string | |
triggerId * | string | |
workspaceId * | string | |
customEventFilter | ||
eventName | object | |
filter | array | |
fingerprint | string | |
name | string | |
notes | string | |
type | string |
triggers_delete
[DELETE] Delete a GTM trigger. Requires GTM_MCP_ENABLE_DELETES=true and confirm=true.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | |
confirm * | boolean | |
containerId * | string | |
triggerId * | string | |
workspaceId * | string |
variables_list
List all user-defined GTM variables in a workspace. Automatically follows pagination to return all variables.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | |
containerId * | string | |
workspaceId * | string | |
maxPages | integer | Maximum number of API pages to fetch (default 50). If more pages remain, the result includes truncated:true and a nextPageToken. |
pageToken | string | Continuation token to resume listing from a previous truncated result. |
variables_get
Get a specific GTM variable.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | |
containerId * | string | |
variableId * | string | |
workspaceId * | string |
variables_create
[WRITE] Create a GTM variable. Requires GTM_MCP_ENABLE_WRITES=true and confirm=true.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | |
confirm * | boolean | |
containerId * | string | |
name * | string | Variable name. |
type * | string | Variable type (e.g. "v" for data layer, "k" for first-party cookie, "u" for URL, "c" for constant, "jsm" for custom JS, "smm" for lookup table, "gas" for GA settings). |
workspaceId * | string | |
disablingTriggerId | array | |
enablingTriggerId | array | |
notes | string | |
parameter | array | |
parentFolderId | string |
variables_update
[WRITE] Update a GTM variable. Requires GTM_MCP_ENABLE_WRITES=true and confirm=true.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | |
confirm * | boolean | |
containerId * | string | |
variableId * | string | |
workspaceId * | string | |
fingerprint | string | |
name | string | |
notes | string | |
parameter | array | |
type | string |
variables_delete
[DELETE] Delete a GTM variable. Requires GTM_MCP_ENABLE_DELETES=true and confirm=true.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | |
confirm * | boolean | |
containerId * | string | |
variableId * | string | |
workspaceId * | string |
folders_list
List all GTM folders in a workspace. Automatically follows pagination to return all folders.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | |
containerId * | string | |
workspaceId * | string | |
maxPages | integer | Maximum number of API pages to fetch (default 50). If more pages remain, the result includes truncated:true and a nextPageToken. |
pageToken | string | Continuation token to resume listing from a previous truncated result. |
folders_get
Get a specific GTM folder.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | |
containerId * | string | |
folderId * | string | |
workspaceId * | string |
folders_entities
List all entities (tags, triggers, variables) within a specific GTM folder.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | |
containerId * | string | |
folderId * | string | |
workspaceId * | string |
folders_create
[WRITE] Create a GTM folder. Requires GTM_MCP_ENABLE_WRITES=true and confirm=true.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | |
confirm * | boolean | |
containerId * | string | |
name * | string | |
workspaceId * | string | |
notes | string |
folders_update
[WRITE] Update a GTM folder. Requires GTM_MCP_ENABLE_WRITES=true and confirm=true.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | |
confirm * | boolean | |
containerId * | string | |
folderId * | string | |
workspaceId * | string | |
fingerprint | string | |
name | string | |
notes | string |
folders_delete
[DELETE] Delete a GTM folder. Requires GTM_MCP_ENABLE_DELETES=true and confirm=true. Contents of the folder will be unfoldered, not deleted.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | |
confirm * | boolean | |
containerId * | string | |
folderId * | string | |
workspaceId * | string |
folders_move_entities
[WRITE] Move tags/triggers/variables into a folder. Requires GTM_MCP_ENABLE_WRITES=true and confirm=true.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | |
confirm * | boolean | |
containerId * | string | |
folderId * | string | The destination folder ID. |
workspaceId * | string | |
tagId | array | Tag IDs to move. |
triggerId | array | Trigger IDs to move. |
variableId | array | Variable IDs to move. |
built_in_variables_list
List all currently enabled built-in variables in a GTM workspace.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | |
containerId * | string | |
workspaceId * | string |
built_in_variables_enable
[WRITE] Enable one or more built-in variables in a GTM workspace. Requires GTM_MCP_ENABLE_WRITES=true and confirm=true.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | |
confirm * | boolean | |
containerId * | string | |
types * | array | Array of built-in variable types to enable. Known types include: pageUrl, pageHostname, pagePath, referrer, event, clickElement, clickClasses, clickId, clickTarget, clickUrl, and more. |
workspaceId * | string |
built_in_variables_disable
[DELETE] Disable one or more built-in variables in a GTM workspace. Requires GTM_MCP_ENABLE_DELETES=true and confirm=true.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | |
confirm * | boolean | |
containerId * | string | |
types * | array | Array of built-in variable types to disable. |
workspaceId * | string |
built_in_variables_revert
[WRITE] Revert changes to a built-in variable in the workspace to the original container version. Requires GTM_MCP_ENABLE_WRITES=true and confirm=true.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | |
confirm * | boolean | |
containerId * | string | |
type * | string | The built-in variable type to revert. |
workspaceId * | string |
versions_list
List all container version headers (summary) for a GTM container.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | |
containerId * | string | |
includeDeleted | boolean | Include deleted versions in results. |
versions_get
Get the full contents of a specific GTM container version. Pass "live" as containerVersionId to get the currently live version.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | |
containerId * | string | |
containerVersionId * | string | The container version ID, or "live" for the current live version. |
versions_create
[WRITE] Create a new GTM container version from a workspace (checkpoint). Requires GTM_MCP_ENABLE_WRITES=true and confirm=true. This takes a snapshot of the workspace into a versioned checkpoint without publishing.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | |
confirm * | boolean | |
containerId * | string | |
workspaceId * | string | |
name | string | Version name/label. |
notes | string | Version notes / change description. |
versions_set_latest
[WRITE] Set a specific container version as the "latest" (synchronizes the default workspace with this version). Note: This does NOT publish. Use versions_publish to go live. Requires GTM_MCP_ENABLE_WRITES=true and confirm=true.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | |
confirm * | boolean | |
containerId * | string | |
containerVersionId * | string | The version ID to set as latest. |
versions_undelete
[WRITE] Undelete a previously deleted GTM container version. Requires GTM_MCP_ENABLE_WRITES=true and confirm=true.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | |
confirm * | boolean | |
containerId * | string | |
containerVersionId * | string |
versions_delete
[DELETE] Delete a GTM container version. Requires GTM_MCP_ENABLE_DELETES=true and confirm=true. Cannot delete a currently published (live) version.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | |
confirm * | boolean | |
containerId * | string | |
containerVersionId * | string |
workspace_quick_preview
Generate a quick-preview (debug) link for a GTM workspace. This does NOT publish — it just enables preview mode. Returns a preview container version with any compilation errors.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | |
containerId * | string | |
workspaceId * | string |
versions_publish
[PUBLISH] Publish a specific GTM container version to live. Requires GTM_MCP_ENABLE_PUBLISH=true and confirm=true. ⚠️ This immediately makes the version live in production.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | |
confirm * | boolean | Must be true to confirm this publish operation. |
containerId * | string | |
containerVersionId * | string | The version ID to publish. |
workspace_create_version_and_publish
[PUBLISH] Create a new container version from a workspace and immediately publish it. Requires GTM_MCP_ENABLE_PUBLISH=true and confirm=true. ⚠️ This is the most powerful write operation — it goes live in production immediately.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | |
confirm * | boolean | Must be true to confirm this publish operation. |
containerId * | string | |
workspaceId * | string | |
name | string | Version name. |
notes | string | Version notes. |
environments_list
List all environments in a GTM container. Automatically follows pagination.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
containerId * | string | The GTM container ID. |
maxPages | integer | Maximum number of API pages to fetch (default 50). If more pages remain, the result includes truncated:true and a nextPageToken. |
pageToken | string | Continuation token to resume listing from a previous truncated result. |
environments_get
Get details of a specific GTM environment.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
containerId * | string | The GTM container ID. |
environmentId * | string | The GTM environment ID. |
environments_create
[WRITE] Create a new GTM environment. Requires GTM_MCP_ENABLE_WRITES=true and confirm=true.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
confirm * | boolean | Must be true to confirm this write operation. |
containerId * | string | The GTM container ID. |
name * | string | Environment name. |
description | string | Environment description. |
enableDebug | boolean | Whether to enable debug by default. |
url | string | Default preview page URL for the environment. |
environments_update
[WRITE] Update an existing GTM environment. Requires GTM_MCP_ENABLE_WRITES=true and confirm=true.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
confirm * | boolean | Must be true to confirm this write operation. |
containerId * | string | The GTM container ID. |
environmentId * | string | The GTM environment ID to update. |
description | string | New description. |
enableDebug | boolean | Whether to enable debug by default. |
fingerprint | string | Current fingerprint (for optimistic locking). |
name | string | New environment name. |
url | string | New default preview page URL. |
environments_reauthorize
[PUBLISH] Re-generate the authorization code for a GTM environment. Requires GTM_MCP_ENABLE_PUBLISH=true and confirm=true. ⚠️ This rotates the environment auth token; any embedded snippet using the old token stops working until updated.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
confirm * | boolean | Must be true to confirm this high-impact operation. |
containerId * | string | The GTM container ID. |
environmentId * | string | The GTM environment ID to reauthorize. |
environments_delete
[DELETE] Delete a GTM environment. Requires GTM_MCP_ENABLE_DELETES=true and confirm=true.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
confirm * | boolean | Must be true to confirm this delete operation. |
containerId * | string | The GTM container ID. |
environmentId * | string | The GTM environment ID to delete. |
user_permissions_list
List all user permissions for a GTM account. Automatically follows pagination. Each record shows a user email plus their account and per-container access levels.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
maxPages | integer | Maximum number of API pages to fetch (default 50). If more pages remain, the result includes truncated:true and a nextPageToken. |
pageToken | string | Continuation token to resume listing from a previous truncated result. |
user_permissions_get
Get a specific user permission record for a GTM account.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
userPermissionId * | string | The user permission ID. |
user_permissions_create
[WRITE] Grant a user access to a GTM account (and optionally containers). Requires GTM_MCP_ENABLE_WRITES=true and confirm=true.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
confirm * | boolean | Must be true to confirm this write operation. |
emailAddress * | string | Email address of the user to grant access to. |
accountPermission | string | Account-level permission. |
containerAccess | array | Per-container access entries. |
user_permissions_update
[WRITE] Update a user's account and/or container access levels. Requires GTM_MCP_ENABLE_WRITES=true and confirm=true. Provide the full intended access (account + container) as the API replaces the record.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
confirm * | boolean | Must be true to confirm this write operation. |
userPermissionId * | string | The user permission ID to update. |
accountPermission | string | Account-level permission. |
containerAccess | array | Per-container access entries. |
user_permissions_delete
[DELETE] Revoke a user's access to a GTM account. Requires GTM_MCP_ENABLE_DELETES=true and confirm=true.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
confirm * | boolean | Must be true to confirm this delete operation. |
userPermissionId * | string | The user permission ID to delete. |
clients_list
List all GTM clients in a workspace. Automatically follows pagination.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
containerId * | string | The GTM container ID. |
workspaceId * | string | The GTM workspace ID. |
maxPages | integer | Maximum number of API pages to fetch (default 50). If more pages remain, the result includes truncated:true and a nextPageToken. |
pageToken | string | Continuation token to resume listing from a previous truncated result. |
clients_get
Get a specific GTM client.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
clientId * | string | The clients ID. |
containerId * | string | The GTM container ID. |
workspaceId * | string | The GTM workspace ID. |
clients_create
[WRITE] Create a new GTM client. Requires GTM_MCP_ENABLE_WRITES=true and confirm=true. Pass the full resource as a JSON string in bodyJson.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
bodyJson * | string | Full clients resource as a JSON string (e.g. {"name":"...","type":"..."}). |
confirm * | boolean | Must be true to confirm this write operation. |
containerId * | string | The GTM container ID. |
workspaceId * | string | The GTM workspace ID. |
clients_update
[WRITE] Update an existing GTM client. Requires GTM_MCP_ENABLE_WRITES=true and confirm=true. Pass the full resource as a JSON string in bodyJson.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
bodyJson * | string | Full clients resource as a JSON string. |
clientId * | string | The clients ID to update. |
confirm * | boolean | Must be true to confirm this write operation. |
containerId * | string | The GTM container ID. |
workspaceId * | string | The GTM workspace ID. |
fingerprint | string | Current fingerprint (for optimistic locking). |
clients_delete
[DELETE] Delete a GTM client. Requires GTM_MCP_ENABLE_DELETES=true and confirm=true.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
clientId * | string | The clients ID to delete. |
confirm * | boolean | Must be true to confirm this delete operation. |
containerId * | string | The GTM container ID. |
workspaceId * | string | The GTM workspace ID. |
clients_revert
[WRITE] Revert workspace changes to a GTM client back to its last container-version state. Requires GTM_MCP_ENABLE_WRITES=true and confirm=true.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
clientId * | string | The clients ID to revert. |
confirm * | boolean | Must be true to confirm this write operation. |
containerId * | string | The GTM container ID. |
workspaceId * | string | The GTM workspace ID. |
fingerprint | string | Current fingerprint (for optimistic locking). |
transformations_list
List all GTM transformations in a workspace. Automatically follows pagination.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
containerId * | string | The GTM container ID. |
workspaceId * | string | The GTM workspace ID. |
maxPages | integer | Maximum number of API pages to fetch (default 50). If more pages remain, the result includes truncated:true and a nextPageToken. |
pageToken | string | Continuation token to resume listing from a previous truncated result. |
transformations_get
Get a specific GTM transformation.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
containerId * | string | The GTM container ID. |
transformationId * | string | The transformations ID. |
workspaceId * | string | The GTM workspace ID. |
transformations_create
[WRITE] Create a new GTM transformation. Requires GTM_MCP_ENABLE_WRITES=true and confirm=true. Pass the full resource as a JSON string in bodyJson.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
bodyJson * | string | Full transformations resource as a JSON string (e.g. {"name":"...","type":"..."}). |
confirm * | boolean | Must be true to confirm this write operation. |
containerId * | string | The GTM container ID. |
workspaceId * | string | The GTM workspace ID. |
transformations_update
[WRITE] Update an existing GTM transformation. Requires GTM_MCP_ENABLE_WRITES=true and confirm=true. Pass the full resource as a JSON string in bodyJson.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
bodyJson * | string | Full transformations resource as a JSON string. |
confirm * | boolean | Must be true to confirm this write operation. |
containerId * | string | The GTM container ID. |
transformationId * | string | The transformations ID to update. |
workspaceId * | string | The GTM workspace ID. |
fingerprint | string | Current fingerprint (for optimistic locking). |
transformations_delete
[DELETE] Delete a GTM transformation. Requires GTM_MCP_ENABLE_DELETES=true and confirm=true.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
confirm * | boolean | Must be true to confirm this delete operation. |
containerId * | string | The GTM container ID. |
transformationId * | string | The transformations ID to delete. |
workspaceId * | string | The GTM workspace ID. |
transformations_revert
[WRITE] Revert workspace changes to a GTM transformation back to its last container-version state. Requires GTM_MCP_ENABLE_WRITES=true and confirm=true.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
confirm * | boolean | Must be true to confirm this write operation. |
containerId * | string | The GTM container ID. |
transformationId * | string | The transformations ID to revert. |
workspaceId * | string | The GTM workspace ID. |
fingerprint | string | Current fingerprint (for optimistic locking). |
zones_list
List all GTM zones in a workspace. Automatically follows pagination.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
containerId * | string | The GTM container ID. |
workspaceId * | string | The GTM workspace ID. |
maxPages | integer | Maximum number of API pages to fetch (default 50). If more pages remain, the result includes truncated:true and a nextPageToken. |
pageToken | string | Continuation token to resume listing from a previous truncated result. |
zones_get
Get a specific GTM zone.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
containerId * | string | The GTM container ID. |
workspaceId * | string | The GTM workspace ID. |
zoneId * | string | The zones ID. |
zones_create
[WRITE] Create a new GTM zone. Requires GTM_MCP_ENABLE_WRITES=true and confirm=true. Pass the full resource as a JSON string in bodyJson.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
bodyJson * | string | Full zones resource as a JSON string (e.g. {"name":"...","type":"..."}). |
confirm * | boolean | Must be true to confirm this write operation. |
containerId * | string | The GTM container ID. |
workspaceId * | string | The GTM workspace ID. |
zones_update
[WRITE] Update an existing GTM zone. Requires GTM_MCP_ENABLE_WRITES=true and confirm=true. Pass the full resource as a JSON string in bodyJson.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
bodyJson * | string | Full zones resource as a JSON string. |
confirm * | boolean | Must be true to confirm this write operation. |
containerId * | string | The GTM container ID. |
workspaceId * | string | The GTM workspace ID. |
zoneId * | string | The zones ID to update. |
fingerprint | string | Current fingerprint (for optimistic locking). |
zones_delete
[DELETE] Delete a GTM zone. Requires GTM_MCP_ENABLE_DELETES=true and confirm=true.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
confirm * | boolean | Must be true to confirm this delete operation. |
containerId * | string | The GTM container ID. |
workspaceId * | string | The GTM workspace ID. |
zoneId * | string | The zones ID to delete. |
zones_revert
[WRITE] Revert workspace changes to a GTM zone back to its last container-version state. Requires GTM_MCP_ENABLE_WRITES=true and confirm=true.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
confirm * | boolean | Must be true to confirm this write operation. |
containerId * | string | The GTM container ID. |
workspaceId * | string | The GTM workspace ID. |
zoneId * | string | The zones ID to revert. |
fingerprint | string | Current fingerprint (for optimistic locking). |
templates_list
List all GTM templates in a workspace. Automatically follows pagination.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
containerId * | string | The GTM container ID. |
workspaceId * | string | The GTM workspace ID. |
maxPages | integer | Maximum number of API pages to fetch (default 50). If more pages remain, the result includes truncated:true and a nextPageToken. |
pageToken | string | Continuation token to resume listing from a previous truncated result. |
templates_get
Get a specific GTM template.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
containerId * | string | The GTM container ID. |
templateId * | string | The templates ID. |
workspaceId * | string | The GTM workspace ID. |
templates_create
[WRITE] Create a new GTM template. Requires GTM_MCP_ENABLE_WRITES=true and confirm=true. Pass the full resource as a JSON string in bodyJson.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
bodyJson * | string | Full templates resource as a JSON string (e.g. {"name":"...","type":"..."}). |
confirm * | boolean | Must be true to confirm this write operation. |
containerId * | string | The GTM container ID. |
workspaceId * | string | The GTM workspace ID. |
templates_update
[WRITE] Update an existing GTM template. Requires GTM_MCP_ENABLE_WRITES=true and confirm=true. Pass the full resource as a JSON string in bodyJson.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
bodyJson * | string | Full templates resource as a JSON string. |
confirm * | boolean | Must be true to confirm this write operation. |
containerId * | string | The GTM container ID. |
templateId * | string | The templates ID to update. |
workspaceId * | string | The GTM workspace ID. |
fingerprint | string | Current fingerprint (for optimistic locking). |
templates_delete
[DELETE] Delete a GTM template. Requires GTM_MCP_ENABLE_DELETES=true and confirm=true.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
confirm * | boolean | Must be true to confirm this delete operation. |
containerId * | string | The GTM container ID. |
templateId * | string | The templates ID to delete. |
workspaceId * | string | The GTM workspace ID. |
templates_revert
[WRITE] Revert workspace changes to a GTM template back to its last container-version state. Requires GTM_MCP_ENABLE_WRITES=true and confirm=true.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
confirm * | boolean | Must be true to confirm this write operation. |
containerId * | string | The GTM container ID. |
templateId * | string | The templates ID to revert. |
workspaceId * | string | The GTM workspace ID. |
fingerprint | string | Current fingerprint (for optimistic locking). |
gtag_config_list
List all GTM gtag configs in a workspace. Automatically follows pagination.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
containerId * | string | The GTM container ID. |
workspaceId * | string | The GTM workspace ID. |
maxPages | integer | Maximum number of API pages to fetch (default 50). If more pages remain, the result includes truncated:true and a nextPageToken. |
pageToken | string | Continuation token to resume listing from a previous truncated result. |
gtag_config_get
Get a specific GTM gtag config.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
containerId * | string | The GTM container ID. |
gtagConfigId * | string | The gtag configs ID. |
workspaceId * | string | The GTM workspace ID. |
gtag_config_create
[WRITE] Create a new GTM gtag config. Requires GTM_MCP_ENABLE_WRITES=true and confirm=true. Pass the full resource as a JSON string in bodyJson.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
bodyJson * | string | Full gtag configs resource as a JSON string (e.g. {"name":"...","type":"..."}). |
confirm * | boolean | Must be true to confirm this write operation. |
containerId * | string | The GTM container ID. |
workspaceId * | string | The GTM workspace ID. |
gtag_config_update
[WRITE] Update an existing GTM gtag config. Requires GTM_MCP_ENABLE_WRITES=true and confirm=true. Pass the full resource as a JSON string in bodyJson.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
bodyJson * | string | Full gtag configs resource as a JSON string. |
confirm * | boolean | Must be true to confirm this write operation. |
containerId * | string | The GTM container ID. |
gtagConfigId * | string | The gtag configs ID to update. |
workspaceId * | string | The GTM workspace ID. |
fingerprint | string | Current fingerprint (for optimistic locking). |
gtag_config_delete
[DELETE] Delete a GTM gtag config. Requires GTM_MCP_ENABLE_DELETES=true and confirm=true.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The GTM account ID. |
confirm * | boolean | Must be true to confirm this delete operation. |
containerId * | string | The GTM container ID. |
gtagConfigId * | string | The gtag configs ID to delete. |
workspaceId * | string | The GTM workspace ID. |
audit_container
Inspect a GTM workspace for common analytics implementation issues. Returns structured findings with severity levels (error/warning/info). This is a read-only operation — it never modifies anything.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | |
containerId * | string | |
workspaceId * | string | |
includeInfo | boolean | Include informational findings (verbose). Default: false. |
export_container
Export a full GTM workspace summary as structured JSON. Returns all tags, triggers, variables, folders, and built-in variables. This is a read-only operation. Use this for documentation, auditing, or feeding container data to other tools.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | |
containerId * | string | |
workspaceId * | string | |
format | string | "full" = all fields, "summary" = key fields only, "names_only" = just names and IDs |
ga4_account_summaries_list
List GA4 account summaries accessible to the authenticated user. Each summary includes the account plus a lightweight list of its property summaries (property ID + display name). Best starting point to discover available GA4 accounts and properties. Read-only.
| Parameter | Type | Description |
|---|---|---|
maxPages | integer | Maximum number of API pages to fetch (default 50). If more pages remain, the result includes truncated:true and a nextPageToken. |
pageToken | string | Continuation token to resume listing from a previous truncated result. |
ga4_properties_list
List GA4 properties under a given parent account. Returns full property records (display name, time zone, currency, industry, service level). Read-only.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | Parent GA4 account ID, e.g. "123456" or "accounts/123456". |
maxPages | integer | Maximum number of API pages to fetch (default 50). If more pages remain, the result includes truncated:true and a nextPageToken. |
pageToken | string | Continuation token to resume listing from a previous truncated result. |
showDeleted | boolean | Include soft-deleted (trashed) properties in the results. |
ga4_property_get
Get a single GA4 property by ID, including display name, time zone, currency, industry category, and service level. Read-only.
| Parameter | Type | Description |
|---|---|---|
property * | string | GA4 property ID, e.g. "123456789" or "properties/123456789". |
ga4_data_streams_list
List data streams for a GA4 property (web, Android, iOS). Web streams include the measurement ID and default URI; app streams include package name / bundle ID. Use this to audit measurement IDs and stream config. Read-only.
| Parameter | Type | Description |
|---|---|---|
property * | string | GA4 property ID, e.g. "123456789" or "properties/123456789". |
maxPages | integer | Maximum number of API pages to fetch (default 50). If more pages remain, the result includes truncated:true and a nextPageToken. |
pageToken | string | Continuation token to resume listing from a previous truncated result. |
ga4_enhanced_measurement_get
Get the enhanced measurement settings for a specific WEB data stream (scrolls, outbound clicks, site search, video engagement, file downloads, form interactions). Only valid for web streams. Served via the Admin API v1alpha surface (not yet in v1beta). Read-only.
| Parameter | Type | Description |
|---|---|---|
dataStreamId * | string | The data stream ID (numeric) or full "dataStreams/{id}" suffix. |
property * | string | GA4 property ID, e.g. "123456789" or "properties/123456789". |
ga4_custom_dimensions_list
List custom dimensions configured on a GA4 property (parameter name, display name, scope: EVENT/USER/ITEM). Read-only.
| Parameter | Type | Description |
|---|---|---|
property * | string | GA4 property ID, e.g. "123456789" or "properties/123456789". |
maxPages | integer | Maximum number of API pages to fetch (default 50). If more pages remain, the result includes truncated:true and a nextPageToken. |
pageToken | string | Continuation token to resume listing from a previous truncated result. |
ga4_custom_metrics_list
List custom metrics configured on a GA4 property (parameter name, display name, measurement unit, scope, restricted-metric type). Read-only.
| Parameter | Type | Description |
|---|---|---|
property * | string | GA4 property ID, e.g. "123456789" or "properties/123456789". |
maxPages | integer | Maximum number of API pages to fetch (default 50). If more pages remain, the result includes truncated:true and a nextPageToken. |
pageToken | string | Continuation token to resume listing from a previous truncated result. |
ga4_data_retention_get
Get the data retention settings for a GA4 property (event data retention duration and whether retention resets on new activity). Read-only.
| Parameter | Type | Description |
|---|---|---|
property * | string | GA4 property ID, e.g. "123456789" or "properties/123456789". |
ga4_key_events_list
List key events (formerly "conversion events") for a GA4 property — the current Admin API naming. Returns event name, counting method, and whether the event is deletable. Read-only.
| Parameter | Type | Description |
|---|---|---|
property * | string | GA4 property ID, e.g. "123456789" or "properties/123456789". |
maxPages | integer | Maximum number of API pages to fetch (default 50). If more pages remain, the result includes truncated:true and a nextPageToken. |
pageToken | string | Continuation token to resume listing from a previous truncated result. |
ga4_google_ads_links_list
List Google Ads links for a GA4 property (linked customer ID, personalized-advertising and auto-tagging flags). Read-only.
| Parameter | Type | Description |
|---|---|---|
property * | string | GA4 property ID, e.g. "123456789" or "properties/123456789". |
maxPages | integer | Maximum number of API pages to fetch (default 50). If more pages remain, the result includes truncated:true and a nextPageToken. |
pageToken | string | Continuation token to resume listing from a previous truncated result. |
ga4_run_report
Run a read-only GA4 Data API report for a property over a date range. Returns dimension/metric rows (e.g. event counts by eventName). Useful for reconciling configured GTM/GA4 events against events GA4 actually reports (zero reported activity for a configured event is a red flag). Read-only — never writes. Requires the analytics.readonly scope.
| Parameter | Type | Description |
|---|---|---|
metrics * | array | Metric names, e.g. ["eventCount","totalUsers"]. At least 1, max 10. |
property * | string | GA4 property ID, e.g. "123456789" or "properties/123456789". |
dimensions | array | Dimension names, e.g. ["eventName","date"]. Max 9. Omit for a metric-only report. |
endDate | string | End date: YYYY-MM-DD, "NdaysAgo", "today", or "yesterday". |
limit | integer | Max rows to return (default 250). |
offset | integer | Row offset for paging (default 0). |
orderByMetric | string | Metric name to order by (descending). Optional. |
startDate | string | Start date: YYYY-MM-DD, "NdaysAgo", "today", or "yesterday". |
ga4_run_realtime_report
Run a read-only GA4 Data API Realtime report (events in roughly the last 30 minutes). Useful to confirm a tag is firing right now during live QA. Read-only — never writes. Requires the analytics.readonly scope.
| Parameter | Type | Description |
|---|---|---|
metrics * | array | Metric names, e.g. ["eventCount","totalUsers"]. At least 1, max 10. |
property * | string | GA4 property ID, e.g. "123456789" or "properties/123456789". |
dimensions | array | Dimension names, e.g. ["eventName","date"]. Max 9. Omit for a metric-only report. |
limit | integer | Max rows to return (default 100). |