Skip to main content
Glama
kLOsk

AdLoop: Google Ads, Reddit Ads & GA4

Draft deleting a Tag Manager tag, trigger or variable

draft_delete_gtm_entity
Destructive

Draft deletion of a Google Tag Manager tag, trigger, or variable with a preview; referenced entities are refused and named.

Instructions

Draft deleting a Tag Manager tag, trigger or variable — returns a PREVIEW.

The entity is removed from a workspace and stays on the site until the workspace is published. A trigger that any tag still references, or a variable that a tag, trigger or other variable uses as {{name}}, is refused up front, with the references named. Refused unless gtm.write_enabled is set. Returns the entity that would be deleted, the resolved workspace and a plan_id.

Tag Manager API: https://developers.google.com/tag-platform/tag-manager/api/v2

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entity_idYesNumeric ID of the entity (see list_gtm_tags, list_gtm_triggers and list_gtm_variables).
entity_typeYes"tag", "trigger" or "variable".
workspace_idNoWorkspace to edit (see list_gtm_workspaces). Empty uses the Default Workspace, or the only workspace there is.
gtm_account_idNoNumeric GTM account ID (see list_gtm_accounts). Empty uses gtm.account_id from the config.
gtm_container_idNoNumeric GTM container ID (see list_gtm_containers). Empty uses gtm.container_id from the config.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.32.0
    • changedInput schema / properties / entity_id / description
      Previous value: -"Numeric ID of the entity (see list_gtm_tags and\nlist_gtm_triggers)."New value: +"Numeric ID of the entity (see list_gtm_tags,\nlist_gtm_triggers and list_gtm_variables)."
    • changedInput schema / properties / entity_type / description
      Previous value: -"\"tag\" or \"trigger\"."New value: +"\"tag\", \"trigger\" or \"variable\"."
  2. Addedv0.27.1

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only declare destructiveHint/readOnlyHint/openWorldHint; the description adds substantial context beyond them — that deletion is staged and the entity survives on the site until workspace publish, that referenced triggers/variables are refused with references named, the gtm.write_enabled gate, and the returned payload (entity, workspace, plan_id). This is exactly the extra behavioral disclosure the annotations do not carry.

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

Conciseness4/5

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

Front-loaded with the preview qualifier, then prerequisites and return values in a logical order; every sentence carries information. Slightly long and line-broken, but no filler.

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

Completeness5/5

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

For a destructive-flagged draft mutation with a full schema and an output schema, the description covers the safety profile, preconditions, refusal behavior, and staging model. Nothing an agent needs to invoke it correctly is missing.

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%, so all five parameters are already documented in the schema, including the entity_type values and the fallback behavior of the empty IDs. The description adds no syntax or format detail beyond that, so the baseline 3 is appropriate.

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

Purpose5/5

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

States a precise verb+resource pair ('Draft deleting a Tag Manager tag, trigger or variable') and immediately qualifies it with the preview semantics, which distinguishes it from the actual mutating siblings like draft_gtm_tag and draft_gtm_trigger. An agent can tell what it does without opening the schema.

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?

Gives clear context: it is a preview/draft operation, it refuses up front when the entity is still referenced, and it requires gtm.write_enabled. It does not explicitly name alternative tools (e.g. the non-delete draft tools) or when-not to use this, so it falls short of a full 5.

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