gtm_update_variable
Update selected fields of a Google Tag Manager variable with fingerprint conflict protection, avoiding accidental overwrites in workspace drafts.
Instructions
Safely update selected variable fields with fingerprint conflict protection.
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": {
"account": "<account>",
"container": "<container>",
"workspace": "<workspace>",
"variableId": "<variableId>"
},
"name": "gtm_update_variable"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Display name of the variable. | |
| type | No | GTM variable type, e.g. 'v' (Data Layer), 'c' (Constant), or 'jsm' (Custom JavaScript). | |
| notes | No | ||
| account | Yes | Name or ID of the GTM account (e.g. 'My Company' or '1234567'). | |
| container | Yes | Name, GTM container ID (publicId, e.g. GTM-XXXX), or internal container ID. | |
| parameter | No | ||
| workspace | Yes | Workspace name or ID. Required for every mutating operation. | |
| variableId | Yes | ID of the variable to update (from gtm_list_variables). | |
| formatValue | No | ||
| parentFolderId | No | ||
| enablingTriggerId | No | ||
| disablingTriggerId | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No |