Skip to main content
Glama
dienhokhanh

gtm-mcp-server

by dienhokhanh

gtm_create_tag

Create a Google Tag Manager tag in a chosen workspace draft. Specify account, container, workspace, name, and type to define tags like GA4 events or custom HTML.

Instructions

Create a tag in an explicitly selected workspace. The container is not published.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesDisplay name of the tag in GTM.
typeYesGTM tag type id, e.g. 'gaawe' (GA4 event), 'googtag' (Google tag), 'html' (Custom HTML), or 'awct' (Google Ads Conversion Tracking).
notesNo
pausedNoWhether the tag is inactive.
accountYesName or ID of the GTM account (e.g. 'My Company' or '1234567').
liveOnlyNo
priorityNo
setupTagNo
containerYesName, GTM container ID (publicId, e.g. GTM-XXXX), or internal container ID.
parameterNoParameters in the GTM API format matching the tag type.
workspaceYesWorkspace name or ID. Required for every mutating operation.
teardownTagNo
scheduleEndMsNo
parentFolderIdNo
consentSettingsNo
firingTriggerIdNoTrigger IDs that fire this tag.
scheduleStartMsNo
tagFiringOptionNo
blockingTriggerIdNoTrigger IDs that block this tag.
monitoringMetadataNo
monitoringMetadataTagNameKeyNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.3/5.0
Behavior4/5

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

Annotations already declare readOnly=false, destructive=false and non-idempotent, so safety is covered. The description adds genuinely useful, non-obvious context: the change lands only in the workspace and 'the container is not published', telling the agent nothing goes live until a later publish step.

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 zero filler, and the workspace-scoping constraint is front-loaded ahead of the publish note.

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?

The output schema covers return values and annotations cover safety, but for a 21-parameter, deeply nested creation tool with low schema description coverage, the description does not do enough to help an agent populate the parameter array correctly.

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

Parameters2/5

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

Schema coverage is only 43% across 21 parameters, including nested parameter/setupTag/teardownTag/consentSettings structures, yet the description explains none of them. It only gestures at the workspace requirement, leaving the heavy tag-configuration parameters undocumented in prose.

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?

Specific verb+resource ('Create a tag') scoped to a workspace, which cleanly separates it from gtm_create_trigger, gtm_create_variable, and gtm_update_tag. It does not, however, explicitly name those siblings the way a 5 would.

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?

It implies a workspace must already exist ('explicitly selected workspace'), but there is no when/when-not guidance or routing to alternatives such as gtm_update_tag for modifying an existing tag or gtm_create_workspace as a prerequisite. Usage must be inferred.

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