Skip to main content
Glama
Samarth GTM MCP Server

Samarth GTM MCP Server

Official

built_in_variables_revert

Revert a GTM workspace built-in variable to its original container version to undo workspace-level changes.

Instructions

[WRITE] Revert changes to a built-in variable in the workspace to the original container version. Requires GTM_MCP_ENABLE_WRITES=true and confirm=true.

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": {
      "accountId": "<accountId>",
      "containerId": "<containerId>",
      "workspaceId": "<workspaceId>",
      "type": "<type>",
      "confirm": "<confirm>"
    },
    "name": "built_in_variables_revert"
  }
}

Input Schema

NameRequiredDescriptionDefault
typeYesThe built-in variable type to revert.
confirmYes
accountIdYes
containerIdYes
workspaceIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.497.5
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / accountId / pattern
      Added value: +"^\\d+$"
    • addedInput schema / properties / containerId / pattern
      Added value: +"^\\d+$"
    • addedInput schema / properties / workspaceId / pattern
      Added value: +"^\\d+$"
  2. Addedv1.421.0
  3. Removedv1.350.0
  4. First observedv1.0.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations provided, the description carries the burden and does reasonably well: it declares this is a write, discloses the environment-flag and confirmation gates, and implies destructive loss of workspace-level edits by naming the restore target (original container version). It stops short of stating permission requirements or what happens when the variable is already pristine.

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?

Two short sentences, front-loaded with the [WRITE] tag and the action, followed immediately by the execution prerequisites. No filler, and the most decision-relevant information (write gate + confirm) arrives first.

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?

For a five-required-parameter mutation with no annotations and no output schema, the description covers the write nature and the two gating conditions but says nothing about the response, idempotency, or failure modes such as an invalid type or missing workspace changes. Adequate to call safely, not complete.

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 only 20%, so the description needs to compensate. It adds meaning for confirm (must be true) and implicitly for type (the built-in variable type to revert), but accountId, containerId, and workspaceId are left to be inferred from the GTM hierarchy and their regex patterns alone.

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 (Revert) and a specific resource (a built-in variable in the workspace) and names the target state (the original container version), so the operation is unambiguous. It does not explicitly contrast itself with siblings like built_in_variables_enable/disable, but the [WRITE] prefix and 'revert' wording make the distinction inferable.

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?

It gives a real gating condition: GTM_MCP_ENABLE_WRITES=true and confirm=true must be set, which tells the agent when the call will succeed. It does not say when to prefer this over related mutation tools or what to do if the workspace has no local changes, so the usage picture is implied rather than spelled out.

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