environments_create
Creates a new Google Tag Manager environment in a container, letting you define a name, description, and default preview URL for staging or testing traffic.
Instructions
[WRITE] Create a new GTM environment. 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>",
"name": "<name>",
"confirm": "<confirm>"
},
"name": "environments_create"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Default preview page URL for the environment. | |
| name | Yes | 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 | Environment description. | |
| enableDebug | No | Whether to enable debug by default. |