environments_update
Update an existing Google Tag Manager environment by changing only specified fields; omitted settings are preserved. Requires writes enabled and confirm=true.
Instructions
[WRITE] Update an existing GTM environment (read-modify-write: omitted fields are preserved). Requires GTM_MCP_ENABLE_WRITES=true and confirm=true.
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>",
"environmentId": "<environmentId>",
"confirm": "<confirm>"
},
"name": "environments_update"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | New default preview page URL. | |
| name | No | New environment name. | |
| confirm | Yes | Must be true to confirm this write operation. | |
| accountId | Yes | The GTM account ID. | |
| containerId | Yes | The GTM container ID. | |
| description | No | New description. | |
| enableDebug | No | Whether to enable debug by default. | |
| fingerprint | No | Current fingerprint (for optimistic locking). | |
| environmentId | Yes | The GTM environment ID to update. |