Skip to main content
Glama
dienhokhanh

gtm-mcp-server

by dienhokhanh

gtm_get_variable

Read-onlyIdempotent

Fetch a single user-defined Google Tag Manager variable by ID from a workspace to review its configuration before making changes.

Instructions

Get one user-defined variable by ID from a workspace.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountYesName or ID of the GTM account (e.g. 'My Company' or '1234567').
containerYesName, GTM container ID (publicId, e.g. GTM-XXXX), or internal container ID.
workspaceNoWorkspace name or ID. Omit only for reads to use Default Workspace.
variableIdYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint, and destructiveHint=false, so the safety profile is fully covered. The description adds one useful qualifier ('user-defined', distinguishing from built-in variables) and the workspace scope, but says nothing about not-found behavior or error conditions.

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?

A single front-loaded sentence with the operation, resource, and locator scope in order. No filler words; every element earns its place.

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

Completeness3/5

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

With an output schema covering return values and annotations covering the safety profile, the core is present. Still, for a getter it omits what identifies a valid user-defined variable versus a built-in one and what happens when the ID is unknown, leaving clear gaps.

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 coverage is 75% (account, container, workspace documented; variableId is not). The phrase 'by ID' lightly reinforces that variableId is an identifier, and 'from a workspace' hints at the optional workspace parameter, but no format or syntax is added beyond the schema. Baseline 3 is appropriate.

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?

The description states a specific verb ('Get'), resource ('user-defined variable'), and scope ('by ID from a workspace'), which cleanly separates it from the sibling gtm_list_variables. However, it does not explicitly name any alternative tool, so sibling differentiation is implied rather than stated.

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

Usage Guidelines2/5

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

There is no when-to-use guidance, no mention of prerequisites (e.g. needing an existing variableId), and no pointer to alternatives like gtm_list_variables for discovery. The agent must infer usage entirely from the tool name.

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