Skip to main content
Glama
AlexStansfield

gtm-mcp-server

Enable Built-In Variables

gtm_enable_built_in_variables
Idempotent

Enable Google Tag Manager built-in variables like Page URL and Click Classes in a specified workspace, making them available for use in tags and triggers.

Instructions

Enable one or more built-in variables in a workspace so tags and triggers can reference them (e.g. {{Page URL}}, {{Click Classes}}).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typesYesBuilt-in variable types in camelCase, e.g. pageUrl, pagePath, pageHostname, referrer, event, clickElement, clickClasses, clickId, clickTarget, clickUrl, clickText, formElement, formClasses, formId, formTarget, formUrl, formText, errorMessage, errorUrl, errorLine, containerId, containerVersion, randomNumber, htmlId, scrollDepthThreshold, videoTitle, videoUrl, videoPercent
account_idYesThe GTM account ID
container_idYesThe GTM container ID
workspace_idYesThe GTM workspace ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior4/5

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

Annotations declare idempotentHint=true, destructiveHint=false, and readOnlyHint=false. The description adds context by explaining why enabling is useful (so tags/triggers can reference variables), but does not add extra behavioral detail beyond the annotations. It does not contradict the annotations, and the annotation coverage reduces the need for additional disclosure.

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?

The description is a single, efficient sentence that front-loads the verb and resource. It includes a clear purpose and examples without any filler, making every word earn its place.

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?

The tool is straightforward and all parameters are documented in the schema. The description provides sufficient context for a mutation operation, and there is no output schema to explain. The annotations cover idempotency and non-destructiveness, so the description is complete enough for most use cases.

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%—all parameters have descriptions including the list of valid camelCase values for 'types'. The description adds no additional parameter-level detail beyond what the schema already conveys, so a baseline score of 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?

The description clearly states the action (enable), the resource (built-in variables), and the purpose (so tags and triggers can reference them). It provides concrete examples ({{Page URL}}, {{Click Classes}}) and is easily distinguished from siblings like gtm_disable_built_in_variables or gtm_list_built_in_variables.

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

Usage Guidelines3/5

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

The description implies usage (to enable built-in variables for referencing) but does not explicitly state when to use this tool versus alternatives. It lacks guidance on prerequisites or when not to use it, though its purpose is evident. There is no direct comparison to sibling tools.

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