gtm
Read and write Google Tag Manager objects: accounts, containers, workspaces, tags, triggers, variables. Create versions and publish with real write actions.
Instructions
Google Tag Manager API v2 escape hatch — any method/path under tagmanager/v2. Discover: GET 'accounts', then '/containers', then '/workspaces'. Manage: GET/POST '/tags' | '/triggers' | '/variables'; create a version (POST ':create_version'); publish (POST ':publish'). WRITES + PUBLISH are real and affect the live site — build in a workspace, publish deliberately.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"method": "<method>",
"path": "<path>"
},
"name": "gtm"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| method | Yes | ||
| path | Yes | relative to https://www.googleapis.com/tagmanager/v2/ — e.g. accounts/123/containers/456/workspaces/7/tags | |
| body | No | JSON string for POST/PUT | |
| query | No | optional query string, e.g. fingerprint=... |