gtm_create_variable
Create custom GTM variables by providing account, container, workspace IDs, and variable configuration. Simplify tag management setup with programmatic variable creation.
Instructions
Creates a new variable in a GTM workspace
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": {
"accountId": "<accountId>",
"containerId": "<containerId>",
"workspaceId": "<workspaceId>",
"variable": "<variable>"
},
"name": "gtm_create_variable"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| variable | Yes | ||
| accountId | Yes | GTM Account ID | |
| containerId | Yes | GTM Container ID | |
| workspaceId | Yes | GTM Workspace ID |