Skip to main content
Glama
dhawalshah

google-tag-manager-mcp

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
PORTNoHTTP port (default 8080).8080
BASE_URLNoPublic URL of this service. Used for OAuth metadata and as the canonical resource URI tokens are bound to. Required for Mode B.
LOG_LEVELNoPython log level (default INFO).INFO
GCP_PROJECT_IDNoGCP project hosting Firestore. Required for Mode B.
MCP_USER_EMAILNoYour email, set in Claude Desktop config so the server finds your stored token. Required for Mode A.
ALLOWED_DOMAINSNoComma-separated email domain allowlist (e.g. acme.com,beta.com). Empty = no restriction.
GOOGLE_CLIENT_IDNoGoogle OAuth client ID (alternative to OAUTH_CONFIG_PATH in Mode B).
OAUTH_CONFIG_PATHNoPath to client_secret.json downloaded from Google Cloud Console. Can be used in both modes, or replaced by GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET in Mode B.
GOOGLE_CLIENT_SECRETNoGoogle OAuth client secret (alternative to OAUTH_CONFIG_PATH in Mode B).
OAUTHLIB_RELAX_TOKEN_SCOPENoSet to 1. Required for Mode B - Google returns a superset scope and without this the OAuth callback fails.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}
logging
{}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
gtm_accountB

Manage GTM accounts.

Actions:

  • list: list all accessible accounts (no parent needed).

  • get: get one account. path="accounts/{accountId}".

  • update: update an account. path="accounts/{accountId}", config={...}.

gtm_containerA

Manage GTM containers.

Standard CRUD (list/create: parent='accounts/{a}'; get/update/remove: path='accounts/{a}/containers/{c}') plus:

  • combine: path=, params={containerId,...}, confirm=true. (destructive)

  • lookup: params={destinationId} -> find container by destination. (read-only; no parent/path needed)

  • move_tag_id: path=, params={...}, confirm=true. (destructive)

  • snippet: path= -> GTM install snippet. (read-only)

gtm_workspaceA

Manage GTM workspaces.

Standard CRUD (list/create: parent=; get/update/remove: path=) plus:

  • create_version: path=, config={name,notes}, confirm=true. (destructive)

  • get_status: path= -> uncommitted changes. (read-only)

  • sync: path=, confirm=true. (destructive)

  • quick_preview: path= -> preview of unsubmitted changes. (read-only)

  • resolve_conflict: path=, config={...}, confirm=true. (destructive)

gtm_tagB

Manage GTM tags within a workspace.

Actions:

  • list: parent="accounts/{a}/containers/{c}/workspaces/{w}".

  • get: path="/tags/{tagId}".

  • create: parent=, config={tag definition}.

  • update: path="/tags/{tagId}", config={...}.

  • remove: path="/tags/{tagId}", confirm=true. (destructive)

  • revert: path="/tags/{tagId}", confirm=true. (destructive)

gtm_triggerB

Manage GTM triggers within a workspace. Same action set as gtm_tag (create, get, list, update, remove, revert; remove/revert require confirm=true).

gtm_variableA

Manage GTM variables within a workspace. Same action set as gtm_tag (create, get, list, update, remove, revert; remove/revert require confirm=true).

gtm_built_in_variableB

Manage GTM built-in variables.

Actions:

  • list: parent=.

  • create: parent=, params={"type": ""}.

  • remove: path="/built_in_variables", params={"type": "..."}, confirm=true.

  • revert: path="/built_in_variables", params={"type": "..."}, confirm=true.

gtm_folderB

Manage GTM folders.

Standard CRUD+revert like gtm_tag, plus:

  • entities: path="/folders/{id}" → list entities in folder. (read-only)

  • move_entities_to_folder: path="/folders/{id}", params={tagId/triggerId/variableId}, confirm=true. Moves entities into the folder. (destructive)

gtm_clientB

Manage GTM clients within a workspace. Same action set as gtm_tag (create, get, list, update, remove, revert; remove/revert require confirm=true).

gtm_zoneB

Manage GTM zones within a workspace. Same action set as gtm_tag (create, get, list, update, remove, revert; remove/revert require confirm=true).

gtm_templateC

Manage GTM custom templates. Standard CRUD+revert plus:

  • import_from_gallery: parent= (or path="/templates"), confirm=true. Imports a Community Template Gallery template.

gtm_transformationB

Manage GTM transformations within a workspace. Same action set as gtm_tag (create, get, list, update, remove, revert; remove/revert require confirm=true).

gtm_gtag_configC

Manage GTM Google tag (gtag) config. Standard CRUD (no revert).

gtm_destinationA

Manage GTM destinations.

Actions:

  • list: parent=''.

  • get: path='/destinations/{id}'.

  • link: parent='', params={destinationId}, confirm=true. (Note: Google has deprecated destination linking via API.) (destructive)

gtm_environmentB

Manage GTM environments. Standard CRUD (list/create: parent=''; get/update/remove: path='/environments/{id}') plus:

  • reauthorize: path='/environments/{id}', confirm=true. (destructive)

gtm_versionA

Manage GTM container versions.

Actions:

  • get: path='/versions/{id}'.

  • live: path='' (or parent='') -> currently-published version. (read-only)

  • publish: path='/versions/{id}', confirm=true. PUSHES LIVE. (destructive)

  • set_latest: path='/versions/{id}', confirm=true. (destructive)

  • undelete: path='/versions/{id}', confirm=true. (destructive)

  • update: path='/versions/{id}', config={...}.

  • remove: path='/versions/{id}', confirm=true. (destructive)

gtm_version_headerB

List GTM container version headers.

Actions:

  • list: parent=''.

  • latest: parent='' -> latest version header. (read-only)

gtm_user_permissionB

Manage GTM account user permissions.

Actions:

  • list: parent='accounts/{id}'.

  • get: path='accounts/{id}/user_permissions/{permId}'.

  • create: parent='accounts/{id}', config={emailAddress, accountAccess, containerAccess}.

  • update: path='accounts/{id}/user_permissions/{permId}', config={...}.

  • remove: path='accounts/{id}/user_permissions/{permId}', confirm=true. (destructive)

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.5/5.0

Scored across 18 tools

Disambiguation5/5

Each tool is explicitly scoped to a distinct GTM entity (account, container, workspace, tag, trigger, etc.), with names like gtm_tag and gtm_trigger making the target resource clear. Despite shared CRUD actions, the entity distinction eliminates any ambiguity.

Naming Consistency5/5

All tools follow the consistent pattern gtm_<entity> in snake_case, and actions within each tool use standard verbs (list, get, create, update, remove, revert). This uniform naming convention makes the tool set predictable and easy to navigate.

Tool Count4/5

At 18 tools, the count is on the higher end of the typical range, but it is justified by the breadth of GTM's API which includes many distinct entity types. Each tool earns its place by covering a unique resource, so the count feels appropriate for the domain's complexity.

Completeness5/5

The server covers all major GTM entities including accounts, containers, workspaces, tags, triggers, variables, folders, clients, zones, templates, transformations, destinations, environments, versions, and user permissions. It also includes built-in variables and version headers, providing comprehensive lifecycle management with no obvious gaps.

Maintenance

ActivityMaintained
ResponsivenessNo issues