> ## Documentation Index
> Fetch the complete documentation index at: https://docs.markifact.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Environment

> Updates a Google Tag Manager environment's name, description, URL, or debug setting

Updates a Google Tag Manager environment's name, description, URL, or debug setting.

| | |
| - | - |
| **App** | Google Tag Manager |
| **Operation ID** | `gtm_update_environment` |
| **Type** | Action |
| **Connection** | `gtm` (required) |
| **Credits per run** | 1 |
| **Agent / MCP tool** | Yes |
| **Requires approval** | Yes (write operation) |

## Inputs

| Field | Type | Required | Default | Description |
| - | - | - | - | - |
| `account` | DynamicAccount | Yes | - | Select the Google Tag Manager account. |
| `container` | DynamicAccount | Yes | - | Select the container. |
| `environment` | DynamicAccount | Yes | - | Select the environment, or provide an environment ID from gtm\_list\_environments. |
| `name` | string | No | - | New name for the environment. |
| `description` | string | No | - | New description for the environment. |
| `url` | string | No | - | New default preview page URL for the environment. |
| `enable_debug` | boolean | No | - | Whether debug mode is enabled by default for the environment. |

## Output

**Type**: `Dict`

Returns the updated environment as provided by the Tag Manager API.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.