Skip to main content
Glama

Google Ads & Meta Ads

Tag Manager: List Triggers and Variables

gtm_list_triggers_variables
Read-onlyIdempotent

List the triggers and user-defined variables of one Google Tag Manager container's published version, or of a draft workspace when workspace names one. Each trigger comes with its type (page view, click, custom event, form submission, …), its conditions in words ("{{Page URL}} contains /thank-you") and the tags it fires; each variable with its type (data layer, constant, lookup table, JavaScript, …), its settings and the tags, triggers and variables that reference it. Use it to see what a tag's trigger actually tests or where a value comes from. Also lists the enabled built-in variables (Click URL, Page Path, …) by type, so a missing one can be enabled with gtm_enable_built_in_variables. Read-only.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "gtm_list_triggers_variables"
  }
}

Input Schema

NameRequiredDescriptionDefault
freshNoRead the live version from Google again instead of the copy cached for ten minutes. Only needed right after the user published a change. Default false.
includeNoboth (default), triggers or variables.
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.
workspaceNoRead a draft workspace of the container (by name or id, as the user named it) instead of the published version: what the entities look like with that workspace's unpublished changes. Default: the published version.

Output Schema

NameRequiredDescriptionDefault
scopeYeslive (the published version) or workspace (a draft).
completeYesFalse when a list was cut off by paging; completenessNotes says which.
publicIdNoPublic GTM-XXXXXXX id of the container.
triggersYesTriggers, container order; empty when include=variables.
fromCacheYesTrue when the live version came from the ten-minute cache rather than Google.
variablesYesUser-defined variables; empty when include=triggers.
triggerCountYesTriggers in the version or workspace read.
containerNameYesThe container's name.
containerPathYesAPI path of the container, accounts/{a}/containers/{c}.
liveVersionIdNoId of the published container version the answer describes.
variableCountYesUser-defined variables in the version or workspace read.
workspaceNameNoThe workspace read, when scope is workspace.
builtInVariablesYesEnabled built-in variables.
completenessNotesYesWhat the read did not cover, empty when complete.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true and destructiveHint=false; the description reinforces this with "Read-only" rather than contradicting it. Beyond that it discloses substantive behavior: results are rendered human-readably ("{{Page URL}} contains /thank-you"), built-in variables are included and can be enabled elsewhere, and the default source is the published version unless a workspace is named.

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?

Single front-loaded paragraph that opens with the verb and scope, then elaborates on return contents and alternatives. The detail about trigger condition formatting and variable reference tracking is dense but earns its place; a slight trim of the enumerated type examples would tighten it further.

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?

For a zero-required-parameter read tool with an output schema and full annotation coverage, the description supplies what structured fields cannot: what the returned payload means in practice, the published-vs-draft default, and the follow-up tool for built-ins. Only minor gaps remain, such as how the ten-minute cache interacts with `fresh` and behavior when multiple containers are reachable.

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 four parameters are already documented, which sets a baseline of 3. The description only adds the default-source semantics for the `workspace` parameter (published version when omitted); it says nothing extra about `fresh` caching, `include`, or how `container` resolution works beyond the schema.

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 specific verb+resource: listing triggers and user-defined variables of one GTM container's published version or named draft workspace. It also names the return contents (types, human-readable conditions, referencing entities), so an agent can separate it from gtm_list_tags or gtm_get_workspace_status without opening any 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 an explicit use case ("see what a tag's trigger actually tests or where a value comes from") and routes a related need to gtm_enable_built_in_variables for missing built-ins. It does not explicitly say when to prefer gtm_list_tags or gtm_get_container instead, so guidance is strong but not exhaustive.

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