Skip to main content
Glama
Google Workspace MCP connector

Google Workspace MCP connector

by animesh-ex

gtm_add_datalayer_variables

Creates Google Tag Manager Data Layer Variables for specified dataLayer keys, skipping existing ones and naming new variables 'DLV - '.

Instructions

Create Data Layer Variables (DLV) for dataLayer keys, e.g. ['ecommerce.value', 'ecommerce.currency', 'user_id']. Skips ones that already exist. Names default to 'DLV - '.

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": {
      "workspace": "<workspace>",
      "keys": "<keys>"
    },
    "name": "gtm_add_datalayer_variables"
  }
}

Input Schema

NameRequiredDescriptionDefault
keysYes
workspaceYesWorkspace path (accounts/…/containers/…/workspaces/…), or a container public ID like GTM-XXXX (uses its Default Workspace)
defaultValueNoValue when the key is missing (e.g. 'undefined' or '0')

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.7.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare that this is a non-read-only, non-destructive, open-world operation. The description adds real context beyond that: it says already-existing variables are skipped and that new variables are named 'DLV - <key>'. It does not say what happens to the defaultValue when a key already exists, or whether a version/publish step is needed.

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?

Three short sentences, front-loaded with the action and an inline example, followed by idempotency and naming behavior. No filler, and every sentence carries information.

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 simple three-parameter creation tool with no output schema and clear annotations, the description covers purpose, idempotency, and naming. The remaining gaps concern how defaultValue interacts with existing keys and with keys that are skipped, which are relatively minor.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 67%, and the description compensates for the undocumented 'keys' parameter by giving concrete key-format examples (dot-notation paths like 'ecommerce.value'), which the schema does not. The 'workspace' and 'defaultValue' parameters are already documented in the schema, so the description need not repeat them.

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 and resource ('Create Data Layer Variables (DLV) for dataLayer keys') with concrete key examples, so the resource is unmistakable. It is clearly distinct from the sibling gtm_enable_builtin_variables, but it does not explicitly point at or differentiate itself from other gtm_add_* tools.

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?

Usage is only implicitly conveyed: an agent infers it should call this when it needs GTM variables for dataLayer keys. There is no explicit statement of when to prefer this over related tools, nor any prerequisite about workspace readiness (for example, whether the workspace must exist or be published afterward).

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