Skip to main content
Glama
AlexStansfield

gtm-mcp-server

Create GTM Tag

gtm_create_tag

Create a new tag in a Google Tag Manager workspace by specifying the account, container, workspace, tag name, type, and optional parameters.

Instructions

Create a new tag in a workspace.

Example parameters for GA4 event parameters (eventSettingsTable): {"key": "eventSettingsTable", "type": "list", "list": [{"type": "map", "map": [{"key": "parameter", "type": "template", "value": "method"}, {"key": "parameterValue", "type": "template", "value": "{{dlv - method}}"}]}]}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName for the tag
typeYesTag type (e.g., 'html', 'img', 'ua', 'gaawe')
account_idYesThe GTM account ID
parametersNoArray of parameter objects. Supports nested structures with list/map for complex parameters like eventSettingsTable
container_idYesThe GTM container ID
workspace_idYesThe GTM workspace ID
firing_trigger_idsNoArray of trigger IDs that fire this tag
blocking_trigger_idsNoArray of trigger IDs that block this tag

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.1/5.0
Behavior2/5

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

The annotations already indicate this is a mutating operation (readOnlyHint false) and not idempotent. The description adds minimal behavioral context beyond a parameter example, not disclosing side effects like tag creation limits, dependency requirements, or interaction with GTM's draft/sync model. It does not contradict annotations.

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 intentionally minimal (a short sentence plus an example JSON block). The example, though lengthy, is structured and syntactically clear. Every element serves a purpose, though one could argue the example could be trimmed, it remains concise overall.

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?

Given the rich schema (100% coverage) and no output schema requirement, the description is mostly complete. The example helps with a common use case, but it doesn't clarify operational nuances such as required identity scopes, permission requirements, or interaction with the GTM workspace publish flow. This is adequate but not exhaustive.

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 description coverage is 100%, so the baseline is 3. The description adds value by demonstrating a complex nested parameter structure (eventSettingsTable) that illustrates how to construct the recursive 'parameters' array. This example aids in understanding beyond schema types, though it is specific to GA4 tags.

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 'Create a new tag in a workspace' which is a specific verb+resource. However, it does not differentiate from sibling operations like gtm_update_tag or gtm_create_trigger beyond the name, but the core purpose is unambiguous.

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

Usage Guidelines2/5

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

There is no explicit guidance on when to use this tool vs. alternatives. The example for GA4 event parameters implies a common use case but does not provide exclusions or compare to gtm_update_tag or gtm_create_trigger. No when-to-use instructions are present.

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