Skip to main content
Glama

Create trigger (🟡 write)

gtm_create_trigger

Create Google Tag Manager triggers for custom events or pageviews, domReady, clicks, and more, with optional filters. Preview changes with dry_run before applying.

Instructions

Create a trigger. type=customEvent needs custom_event_name (the dataLayer event; use_regex=true for 'a|b'). Other types (pageview, domReady, windowLoaded, click, linkClick, historyChange, scrollDepth…) take optional filters: [{"variable": "{{Page Path}}", "op": "equals|contains|startsWith|endsWith|matchRegex", "value": "/checkout", "negate": false}]. dry_run=true (default) previews only.

Input Schema

NameRequiredDescriptionDefault
nameYes
typeNocustomEvent
dry_runNo
filtersNo
containerYes
use_regexNo
workspace_idNo
custom_event_nameNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare the write/non-destructive/non-idempotent profile, and the description adds genuinely new behavior: dry_run=true previews only (so nothing is persisted), and use_regex=true changes custom_event_name into a pattern like 'a|b'. It stops short of saying whether the trigger must be published via gtm_create_version to take effect.

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?

Dense and front-loaded: the core action comes first, then type-specific requirements, then filters, then the dry_run default. Every clause carries information, though the filter example is somewhat sprawling within a single run-on sentence.

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?

An output schema exists so return values need no explanation, and annotations cover the safety profile. The description covers the non-obvious semantics of a mutation tool with 8 undocumented params; the remaining gap is workspace_id and whether a version/publish step is required for the trigger to go live.

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 0%, so the description must carry the load and largely does: it explains type, custom_event_name, use_regex, dry_run, and the exact filter object shape with the full operator vocabulary. Only workspace_id and the container/name semantics go undocumented, though those are close to self-evident.

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 a trigger") and immediately enumerates the trigger types it applies to, so the agent knows this is the creation counterpart to gtm_get_trigger/gtm_list_triggers. Sibling differentiation is implicit through the resource name rather than stated explicitly.

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?

No explicit when-to-use or when-not-to-use guidance versus gtm_create_tag, gtm_create_variable, or gtm_create_version. The only workflow hint is the dry_run=true default, which implies a preview-then-apply pattern, but this is left for the agent to infer.

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