Skip to main content
Glama

Google Ads & Meta Ads

Tag Manager: Enable Built-in Variables

gtm_enable_built_in_variables
Idempotent

Enable one or more of Google Tag Manager's built-in variables (Click URL, Click Text, Click Classes, Form ID, Page Path, Scroll Depth Threshold, …) in a draft workspace of a web container, so triggers and tags can reference them as {{Click URL}}. A click or form trigger whose condition uses a disabled built-in never fires. Types already enabled are skipped. Saved in the existing workspace the user names and NOT published. Requires the Tag Manager connection's editing permission.

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": {
      "workspace": "<workspace>",
      "types": "<types>"
    },
    "name": "gtm_enable_built_in_variables"
  }
}

Input Schema

NameRequiredDescriptionDefault
typesYesBuilt-in variables to enable, by Google's type: CLICK_URL, CLICK_TEXT, CLICK_CLASSES, CLICK_ID, CLICK_ELEMENT, FORM_ID, FORM_URL, PAGE_PATH, PAGE_URL, SCROLL_DEPTH_THRESHOLD, VIDEO_PERCENT, … (web container types; up to 20).
containerNoThe container: its public id (GTM-XXXXXXX), its name, or its API path from gtm_list_containers. May be left out when the connected login reaches exactly one container.
workspaceYesThe existing Tag Manager workspace to save the draft in, by name or id, as the user named it (gtm_list_workspaces). Ask the user which workspace to use; never pick one yourself. Nothing is published.

Output Schema

NameRequiredDescriptionDefault
enabledYesBuilt-ins this call enabled.
publicIdNoPublic GTM-XXXXXXX id of the container.
publishedYesAlways false: the change is a draft until a version is created and published.
workspaceIdYesId of the workspace the change was saved in.
workspaceUrlYesWhere the user reviews, previews and publishes the workspace in Tag Manager.
containerNameYesThe container's name.
containerPathYesAPI path of the container, accounts/{a}/containers/{c}.
workspaceNameYesName of that workspace.
alreadyEnabledYesTypes asked for that the workspace already had.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already cover read-only, idempotency and destructiveness, yet the description adds real context: already-enabled types are silently skipped, changes land in the named existing workspace, and nothing is published. The remaining gap is failure behavior (invalid type, wrong container) which is left unstated.

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 core action, then consequences (triggers not firing), then persistence semantics and permissions. The parenthetical type list with ellipsis is slightly redundant with the schema but earns its place by clarifying naming.

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

Completeness4/5

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

An output schema exists, so return values need no explanation, and the description covers workspace targeting, idempotent skipping, publishing behavior and permission requirements. Only error/failure handling for invalid types or an unreachable container 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 three parameters are already documented, including the enum list and the 'up to 20' cap. The description adds only human-readable type examples and the constraint tying types to web containers, which is marginal beyond the schema.

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?

States a specific verb and resource ('Enable ... built-in variables') plus scope (draft workspace of a web container) and even shows the resulting reference syntax {{Click URL}}. It does not explicitly distinguish itself from sibling creation tools like gtm_create_variable (custom variables), so it falls just short of a 5.

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 a concrete motivating condition: a click or form trigger whose condition uses a disabled built-in never fires. It also gives an explicit operational rule ('Ask the user which workspace to use; never pick one yourself') and notes the editing-permission prerequisite. No explicit when-not or named alternative tool, so not a 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources