Skip to main content
Glama
konkomaji

Google Marketing MCP

by konkomaji

gtm_create_datalayer_variable

Create a Google Tag Manager Data Layer variable to read a specified key, with an optional default value for absent data, simplifying tag configuration.

Instructions

Create a Data Layer Variable (type 'v').

Args: datalayer_name: the dataLayer key to read, e.g. 'ecommerce.value'. default_value: returned when the key is absent. version: dataLayer version, 2 unless you have a specific reason.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
confirmNo
versionNo
account_idNo
container_idNo
workspace_idNo
default_valueNo
datalayer_nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.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 burden. It discloses that default_value is returned when the key is absent and that version defaults to 2, but it does not mention whether the operation is destructive, whether it requires confirmation, what happens on overwrite, or what the response contains. The 'confirm' parameter exists in the schema but is not explained.

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?

The description is compact and front-loaded with the core purpose. The Args section is scannable and each line adds information. It could be slightly more structured, but it is appropriately sized for the tool's complexity.

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?

With 8 parameters, 0% schema coverage, no annotations, and an output schema present, the description is incomplete. It leaves the 'name' parameter, 'confirm' behavior, and the account/container/workspace scoping parameters unexplained. An agent would likely need to guess at required context for a correct call.

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 0%, so the description must compensate. It explains datalayer_name and default_value meaningfully, and notes version semantics ('2 unless you have a specific reason'). However, it does not explain the 'name' parameter (the variable's name in GTM), 'confirm', or the account/container/workspace ID parameters, which are likely required for scoping the request.

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 clearly states the tool creates a Data Layer Variable of type 'v' and identifies the key resource (dataLayer key). It distinguishes from siblings like gtm_create_constant_variable and gtm_create_trigger by naming the specific variable type, though it doesn't explicitly contrast with those siblings.

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 description implies usage context by explaining the datalayer_name and default_value parameters, but it does not explicitly state when to use this tool versus alternatives like gtm_create_constant_variable or gtm_create_ga4_event_tag. No exclusions or alternative routing are provided.

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