Skip to main content
Glama
jinchliu

tagmanager-mcp

by jinchliu

create_variable

Create a variable in a Google Tag Manager workspace draft by providing account, container, and workspace IDs along with the variable body; returns the created variable ID.

Instructions

Creates a variable in the workspace draft.

Changes stay in the workspace until a version is published; nothing goes live. Returns the created variable including its variableId.

Args: account_id: Numeric account ID or full resource path. container_id: Numeric container ID or full resource path. workspace_id: Numeric workspace ID; find it via list_workspaces. variable: Variable resource body. Requires 'name' and 'type'; most types also need 'parameter' (list of {'type', 'key', 'value'} dicts). Data layer variable example: {'name': 'DL - user_id', 'type': 'v', 'parameter': [{'type': 'integer', 'key': 'dataLayerVersion', 'value': '2'}, {'type': 'template', 'key': 'name', 'value': 'user_id'}]}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
variableYes
account_idYes
container_idYes
workspace_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

The description discloses key behavioral traits: changes are not live until a version is published, and it returns the created variable with its ID. This adds significant context beyond the annotations (readOnlyHint: false, destructiveHint: false), which are consistent with a creation operation.

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 well-structured with a clear summary and an Args section. It is mostly concise, but the Args section repeats parameter names already in the schema; a slightly more streamlined version could omit the redundant parameter headers.

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?

The description covers the creation workflow, parameter requirements, and includes an example. However, it does not address potential errors (e.g., duplicate names), permission requirements, or details about the output schema (though output schema exists). Overall, it is quite complete but has minor gaps.

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

Parameters5/5

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

The schema has 0% description coverage, but the description compensates by explaining each parameter: account_id/container_id accept numeric or path, workspace_id is found via list_workspaces, and the variable body requires 'name', 'type', and often 'parameter', with a detailed example. This provides essential meaning missing from the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Creates a variable in the workspace draft.' It uses a specific verb ('creates') and resource ('variable in the workspace draft'), distinguishing it from sibling tools like update_variable and delete_variable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains that changes remain in the workspace until a version is published, providing context for use. However, it does not explicitly state when to use this tool versus alternatives (e.g., update_variable) or when not to use it.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jinchliu/tagmanager-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server