llms.txt Content
# GTM MCP Server
> AI-accessible API for Google Tag Manager. Create tags, audit containers, generate tracking plans, and publish changes — all through natural language.
- URL: https://mcp.gtmeditor.com
- Protocol: Model Context Protocol (MCP) over Streamable HTTP
- Auth: OAuth 2.1 with PKCE (Google account)
## GTM Hierarchy
Account → Container → Workspace → Entities (Tags, Triggers, Variables)
Server-side containers also have: Clients, Transformations
Key rules:
- All mutations happen at the Workspace level — never on the live container
- Changes must be versioned before publishing
- Delete and Publish operations require `confirm: true`
- Updates auto-handle fingerprint for optimistic concurrency
## Getting Started
1. Call `auth_status` to verify authentication
2. `list_accounts` → pick an account
3. `list_containers(accountId)` → pick a container
4. `list_workspaces(accountId, containerId)` → pick a workspace (usually "Default Workspace")
5. Now you can read and write tags, triggers, and variables
Always discover IDs by listing — never guess or hardcode them.
## Tools
### Read Operations
| Tool | Purpose |
|------|---------|
| `list_accounts` | List all GTM accounts the user has access to |
| `list_containers` | List containers in an account (needs accountId) |
| `list_workspaces` | List workspaces in a container (needs accountId, containerId) |
| `list_tags` | List all tags in a workspace |
| `get_tag` | Get full tag details by ID |
| `list_triggers` | List all triggers in a workspace |
| `get_trigger` | Get full trigger details by ID |
| `list_variables` | List all variables in a workspace |
| `get_variable` | Get full variable details by ID |
| `list_folders` | List folders in a workspace |
| `get_folder_entities` | Get tags/triggers/variables in a specific folder |
| `list_built_in_variables` | List enabled built-in variables |
| `get_workspace_status` | Check pending changes and merge conflicts |
### Write Operations
| Tool | Purp