Update Template
update_templateReplace an existing custom template in a Google Tag Manager workspace with a modified version. Read the template first, apply your edits, then send the complete template back to update it.
Instructions
Update a custom template in a workspace.
The template you send replaces the stored one, so read it with get_template first and send the whole thing back with your edits applied.
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>",
"template_id": "<template_id>",
"template": "<template>"
},
"name": "update_template"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| template | Yes | Complete CustomTemplate resource. | |
| account_id | Yes | Numeric Tag Manager account ID. | |
| fingerprint | No | Fingerprint from a previous read. When given, the update fails if the template changed in the meantime. | |
| template_id | Yes | Numeric template ID. | |
| container_id | Yes | Numeric container ID. | |
| workspace_id | Yes | Numeric workspace ID. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||