Skip to main content
Glama
kLOsk

AdLoop: Google Ads, Reddit Ads & GA4

List Tag Manager variables

list_gtm_variables
Read-only

List Google Tag Manager variables, including custom and enabled built-ins, from live containers or unpublished workspaces to verify triggers reference active variables.

Instructions

List GTM variables — both custom and enabled built-in.

Without workspace_id both come from the live container version (the Default Workspace supplies the built-ins only when the live version lists none; built_in_source names where they came from). With workspace_id both come from that workspace's unpublished state. Variables matter because triggers reference them: if a trigger uses {{Form ID}} but Form ID isn't enabled, the trigger never matches.

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspace_idNoWorkspace to read (see list_gtm_workspaces), which includes drafted changes that are not published yet. Empty reads the live (published) container version.
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. Changed3 schema fields changedv0.27.1
    • addedInput schema / properties / gtm_account_id / description
      Added value: +"Numeric GTM account ID (see list_gtm_accounts). Empty\nuses gtm.account_id from the config."
    • addedInput schema / properties / gtm_container_id / description
      Added value: +"Numeric GTM container ID (see list_gtm_containers).\nEmpty uses gtm.container_id from the config."
    • addedInput schema / properties / workspace_id
      Added value: +{
      +  "default": "",
      +  "description": "Workspace to read (see list_gtm_workspaces), which\nincludes drafted changes that are not published yet. Empty reads\nthe live (published) container version.",
      +  "type": "string"
      +}
  2. Addedv0.12.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already establish the read-only, non-destructive safety profile, so the description is freed to add behavioral detail it does provide: the live-vs-unpublished source selection, the Default Workspace fallback for built-ins, and the built_in_source field that records provenance. This is meaningful context beyond the annotations, though nothing on rate limits or pagination.

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 what is listed, then the conditional source behavior, then the rationale and API reference. Dense but each element earns its place; the parenthetical about the Default Workspace fallback is the only slightly tangled portion.

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?

An output schema exists, so return values need no exposition, and the description fully covers purpose, source selection, and the trigger-reference rationale an agent needs to call it correctly. Nothing essential is missing for a zero-required-parameter list tool.

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 the schema already documents workspace_id's live-vs-draft behavior and the account/container ID fallbacks. The description adds the built_in_source naming and the 'both come from' scoping, a marginal addition over the schema, so baseline 3 applies.

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 and resource ('List GTM variables') and immediately scopes it ('both custom and enabled built-in'), distinguishing it from the sibling list_gtm_tags/list_gtm_triggers tools. The workspace_id conditional further clarifies exactly which dataset is returned.

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?

Clearly explains the when/when-not of workspace_id: omit it to read the live container, supply it to read a workspace's unpublished state. It also motivates usage by explaining why variables matter (triggers reference them). It stops short of naming sibling alternatives for adjacent resources, so 4 rather than 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