Skip to main content
Glama
Samarth GTM MCP Server

Samarth GTM MCP Server

Official

environments_delete

Delete a Google Tag Manager environment by account, container, and environment ID. Requires explicit confirmation and the deletes flag enabled, so mutations stay gated.

Instructions

[DELETE] Delete a GTM environment. Requires GTM_MCP_ENABLE_DELETES=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_delete"
  }
}

Input Schema

NameRequiredDescriptionDefault
confirmYesMust be true to confirm this delete operation.
accountIdYesThe GTM account ID.
containerIdYesThe GTM container ID.
environmentIdYesThe GTM environment ID to delete.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.497.5
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / accountId / pattern
      Added value: +"^\\d+$"
    • addedInput schema / properties / containerId / pattern
      Added value: +"^\\d+$"
    • addedInput schema / properties / environmentId / pattern
      Added value: +"^\\d+$"
  2. Addedv1.421.0
  3. Removedv1.350.0
  4. First observedv1.0.0

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations supplied, the description does real work by disclosing the destructive nature and the two safety gates required to execute. It does not say whether deletion is permanent, whether confirm=true is merely a formality, or what happens to entities referencing the environment, so the behavioral picture is incomplete for a write/destroy operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single sentence that front-loads the operation, then the prerequisites. No filler and nothing buried.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive, four-parameter tool with no annotations and no output schema, the definition covers identity of the operation and its gates but leaves irreversibility and downstream effects unstated. It is adequate to trigger a correct call but thin for an agent reasoning about risk.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and all four parameters are documented in the schema, so the baseline is 3. The description's mention of confirm=true restates schema information rather than adding new semantics such as ID format or sourcing.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb and resource ("Delete a GTM environment") plus a [DELETE] tag, which cleanly separates it from environments_get/list/update/create siblings. It stops short of explicitly naming those alternatives, but the operation is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It states the two gating conditions that must hold before calling: the server-side GTM_MCP_ENABLE_DELETES flag and confirm=true in the request. That is concrete when-to-use context, though it offers no explicit when-not or pointer to non-destructive alternatives like environments_update.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools