Skip to main content
Glama

Create or edit a Tag Manager trigger

gtm_upsert_trigger

Create or edit a page view, link click, all-clicks, form submission or custom event trigger, as a draft in the container's Caybl workspace (never published). Dry run by default: returns the trigger in plain words and as saved, and warns when a condition uses a variable that isn't enabled (e.g. Click URL).

Input Schema

NameRequiredDescriptionDefault
kindYes
nameYesTrigger name, e.g. 'Form - contact'.
triggerNoTo EDIT: the existing trigger's id or exact name. Omit to create.
containerNoContainer public id like 'GTM-ABC123', from gtm_list_containers.
eventNameNocustom_event only: the dataLayer event name, e.g. 'generate_lead'.
workspaceNoName of an existing workspace to draft into instead of "Caybl changes" (created automatically).
conditionsNoAll must match (AND). Omit to fire on every matching event.
validateOnlyNoDefault TRUE: a dry run that shows exactly what would change and changes nothing. Show the user the result, and only call again with validateOnly=false once they've agreed.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Annotations declare readOnlyHint=false, destructiveHint=false, and openWorldHint=true, but the description adds substantial behavioral context: draft-only edits, never published, dry-run by default, return format, and a warning when a condition references an unenabled variable. These details go well beyond the annotations and do not contradict them.

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?

The description uses two efficient sentences: the first front-loads the create/edit action, trigger kinds, and draft-only scope; the second covers dry-run behavior, return format, and warnings. There is no filler, and the critical safety constraint is surfaced immediately.

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?

For an 8-parameter mutation tool with no output schema, the description compensates well by explaining the draft-only behavior, dry-run default, return format, and warning behavior. It omits some explicit prerequisite detail around container/workspace sourcing, but the schema already documents those parameters with high coverage.

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 already 88%, so the input schema does most of the work documenting parameters such as kind, trigger, container, workspace, and conditions. The description adds useful high-level context about trigger kinds and dry-run behavior, but does not add per-parameter meaning beyond what the schema already provides, so baseline 3 is appropriate.

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?

States a specific verb (create or edit) and resource (Tag Manager trigger), enumerates five supported trigger kinds, and scopes the result to a draft in the Caybl workspace that is never published. This distinguishes it from siblings like gtm_upsert_tag and gtm_publish without needing to open either schema.

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 clearly signals use for creating or editing a trigger and explains that it drafts rather than publishes, while the schema's validateOnly field enforces a dry-run-first workflow. It does not explicitly name gtm_list_triggers_and_variables as the lookup alternative or state when not to use this tool, so it stops short of a full 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources