Update GTM Variable
gtm_update_variableUpdates an existing Google Tag Manager variable in a workspace, changing only provided fields or replacing the parameters array wholesale.
Instructions
Update an existing variable in a workspace. Only the provided fields are changed; a provided parameters array replaces the existing parameters wholesale.
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_id": "<account_id>",
"container_id": "<container_id>",
"workspace_id": "<workspace_id>",
"variable_id": "<variable_id>"
},
"name": "gtm_update_variable"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | New name for the variable | |
| account_id | Yes | The GTM account ID | |
| parameters | No | New parameters array (replaces all existing parameters) | |
| variable_id | Yes | The GTM variable ID to update | |
| container_id | Yes | The GTM container ID | |
| workspace_id | Yes | The GTM workspace ID |