variables_create
Create a Google Tag Manager variable by specifying name, type, and parameters. Requires write opt-in and per-call confirmation.
Instructions
[WRITE] Create a GTM variable. Requires GTM_MCP_ENABLE_WRITES=true and confirm=true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| accountId | Yes | ||
| containerId | Yes | ||
| workspaceId | Yes | ||
| name | Yes | Variable name. | |
| type | Yes | 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). | |
| parameter | No | ||
| notes | No | ||
| parentFolderId | No | ||
| enablingTriggerId | No | ||
| disablingTriggerId | No | ||
| confirm | Yes |