Skip to main content
Glama
Samarth GTM MCP Server

Samarth GTM MCP Server

Official

destinations_link

Links a Google tag or GA4 destination to a GTM container with write access and confirmation, so you can attach destination IDs to container configuration.

Instructions

[WRITE] Link a destination (Google tag / GA4 destination) to a GTM container. 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>",
      "destinationId": "<destinationId>",
      "confirm": "<confirm>"
    },
    "name": "destinations_link"
  }
}

Input Schema

NameRequiredDescriptionDefault
confirmYesMust be true to confirm this write operation.
accountIdYesThe GTM account ID.
containerIdYesThe GTM container ID.
destinationIdYesThe destination ID to link (e.g. "G-XXXXXXX").
allowUserPermissionFeatureUpdateNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 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+$"
  2. First observedv1.0.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations supplied, the description still carries key behavioral facts: the '[WRITE]' prefix signals mutation, the environment-flag gate reveals a deployment-level guard, and the confirm=true requirement warns about an explicit confirmation step. It omits idempotency (behavior when the destination is already linked) and required IAM permissions, which keeps it below the top score for a no-annotation mutation tool.

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 tight sentences with the write nature and the blocking preconditions front-loaded; every clause earns its place and nothing is padded.

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 five-parameter mutation tool with no output schema, the definition covers the safety-critical facts an agent needs before invoking it. The remaining gap is the untyped-behavior parameter and post-call outcome, but these are minor relative to what is stated.

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 80%, so the baseline is 3, and the description adds no parameter-level detail beyond listing preconditions. The one uncovered parameter, allowUserPermissionFeatureUpdate, is left unexplained in both the schema and the description.

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 names a specific verb and resource ('Link a destination ... to a GTM container') and disambiguates the object by parenthetically defining a destination as a Google tag / GA4 destination. It does not explain how it differs from the numerous ga4_create_*_link siblings, so an agent facing those alternatives must infer the distinction.

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 states hard preconditions (GTM_MCP_ENABLE_WRITES=true, confirm=true), which tells the agent when the call will succeed, but it gives no guidance on when to prefer this tool over a ga4_create_*_link sibling or when not to use it (e.g., already-linked destinations).

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