Skip to main content
Glama
gtm-mcp-server

gtm-mcp-server

by KUHL-HQ

gtm_variable

Create, read, update, delete, or revert Google Tag Manager variables and list them with pagination, so you can manage workspace variables directly.

Instructions

Performs all GTM variable operations: create, get, list, update, remove, revert. The 'list' action returns up to 20 items per page.

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": {
      "action": "<action>",
      "accountId": "<accountId>",
      "containerId": "<containerId>",
      "workspaceId": "<workspaceId>"
    },
    "name": "gtm_variable"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageNoPage number for pagination (starts from 1). Each page contains up to itemsPerPage items.
actionYesThe GTM variable operation to perform. Must be one of: 'create', 'get', 'list', 'update', 'remove', 'revert'.
accountIdYesThe unique ID of the GTM Account containing the variable.
variableIdNoThe unique ID of the GTM variable. Required for 'get', 'update', 'remove', and 'revert' actions.
containerIdYesThe unique ID of the GTM Container containing the variable.
fingerprintNoThe fingerprint for optimistic concurrency control. Required for 'update' and 'revert' actions.
workspaceIdYesThe unique ID of the GTM Workspace containing the variable.
itemsPerPageNoNumber of items to return per page (1-20). Default: 20. Use lower values if experiencing response issues.
createOrUpdateConfigNoConfiguration for 'create' and 'update' actions. All fields correspond to the GTM variable resource, except IDs.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden and falls short. It lists 'remove' and 'revert' without saying they are destructive or whether they are reversible, does not mention optimistic-concurrency requirements for update, and gives no sense of what create/get/list return. Only the pagination cap is disclosed, and that is already in the schema.

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?

Two sentences, front-loaded with the action surface, with no filler or hedging. The second sentence is largely redundant with the schema but is short enough not to be a real cost.

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

Completeness2/5

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

This is a nine-parameter, multi-action tool with a nested config object and no annotations and no output schema. The description says nothing about return shapes for get/list, nothing about destructive-action consequences, and nothing about how the shared action parameter routes between reads and writes, so it is thin for the tool's complexity.

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 every parameter including per-action requirements for variableId and fingerprint. The description adds no meaning beyond that; the one concrete claim (20 items per page) merely restates the itemsPerPage maximum already in 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 set (create, get, list, update, remove, revert) against a specific resource (GTM variable), and the name/resource pairing distinguishes it from the sibling tools that each handle a different GTM entity. It is clear what the tool operates on, though it does not explicitly say how it differs from siblings like gtm_workspace or gtm_container in workflow terms.

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 action enumeration implies which operation to pick (get/list for reads, create/update for writes, remove/revert for changes), which gives implied usage context. However, there is no explicit when-to-use guidance, no alternatives named, and no statement of prerequisites or ordering (e.g., must a workspace be created first).

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