gtm-mcp-server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| GTM_MCP_CONFIG_DIR | No | Directory holding credentials/token | ~/.gtm-mcp |
| GTM_MCP_TOKEN_PATH | No | Path to the cached token | <config_dir>/token.json |
| GTM_MCP_CREDENTIALS_PATH | No | Path to the OAuth client secret file | <config_dir>/credentials.json |
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
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| gtm_list_accountsA | List every GTM account accessible to the authenticated Google user. |
| gtm_list_containersB | List every container in a GTM account. |
| gtm_list_workspacesA | List every workspace in a GTM container. |
| gtm_create_workspaceB | Create a dedicated GTM workspace. Prefer this before making automated changes. |
| gtm_workspace_statusB | Show modified entities and merge conflicts in a workspace. |
| gtm_sync_workspaceA | Sync a workspace with the latest container version. This can modify workspace entities and reveal conflicts. |
| gtm_quick_preview_workspaceA | Compile a workspace into a temporary preview and report compiler/sync errors. It never publishes the container. |
| gtm_list_tagsA | List every tag in a workspace draft, following all result pages. |
| gtm_get_tagA | Get one tag by ID from a workspace draft. |
| gtm_create_tagB | Create a tag in an explicitly selected workspace. The container is not published. |
| gtm_update_tagA | Safely update selected tag fields by fetching and merging the current tag and checking its fingerprint. |
| gtm_delete_tagB | Delete a tag from an explicitly selected workspace draft. |
| gtm_revert_tagB | Revert workspace changes to a tag using optimistic fingerprint protection. |
| gtm_list_triggersB | List every trigger in a workspace, following all result pages. |
| gtm_get_triggerB | Get one trigger by ID from a workspace. |
| gtm_create_triggerB | Create a trigger in an explicitly selected workspace draft. |
| gtm_update_triggerC | Safely update selected trigger fields with fingerprint conflict protection. |
| gtm_delete_triggerA | Delete a trigger from an explicitly selected workspace draft. |
| gtm_revert_triggerB | Revert workspace changes to a trigger with fingerprint protection. |
| gtm_list_variablesA | List every user-defined variable in a workspace, following all result pages. |
| gtm_get_variableB | Get one user-defined variable by ID from a workspace. |
| gtm_create_variableB | Create a user-defined variable in an explicitly selected workspace draft. |
| gtm_update_variableB | Safely update selected variable fields with fingerprint conflict protection. |
| gtm_delete_variableA | Delete a user-defined variable from an explicitly selected workspace draft. |
| gtm_revert_variableB | Revert workspace changes to a user-defined variable with fingerprint protection. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 25 tools
Each tool targets a distinct resource (account, container, workspace, tag, trigger, variable) and action (list, get, create, update, delete, revert, status, sync, preview). The workspace operations are clearly differentiated by their descriptions, so misselection is unlikely.
Tool names follow a consistent gtm_<verb>_<resource> snake_case pattern for the most part, but gtm_workspace_status breaks the verb-first convention, and gtm_quick_preview_workspace uses a compound verb. Minor deviations, still readable.
25 tools is at the upper bound of reasonable for this domain. The full CRUD+revert for three entity types plus workspace management accounts for the count, but it feels heavy rather than tightly scoped.
The set covers full lifecycle for tags, triggers, and variables, and workspace drafting operations. However, there is no publish tool (explicitly avoided in descriptions) and no create/update/delete for containers or accounts, leaving a notable gap in the overall GTM lifecycle.