Skip to main content
Glama
samarthanalytics-sj

Samarth GTM MCP Server

Official

triggers_create

Create a Google Tag Manager trigger with specified type, filters, and parameters to control when tags fire. Requires write access and confirmation.

Instructions

[WRITE] Create a GTM trigger. Requires GTM_MCP_ENABLE_WRITES=true and confirm=true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesTrigger name.
typeYesTrigger type (e.g. "click", "pageview", "customEvent", "domReady", "windowLoaded", "historyChange", "jsError", "scrollDepth", "elementVisibility", "timer", "youTubeVideo", "formSubmission", "linkClick").
limitNoTimer trigger: max number of times the timer fires, as a single Parameter {type:"template", value:"3"} (no key). Dedicated TOP-LEVEL GTM field — do NOT put it in `parameter`.
notesNo
filterNoConditions that must be met for the trigger to fire ("fires on SOME …").
confirmYes
intervalNoTimer trigger: firing interval in MILLISECONDS as a single Parameter {type:"template", value:"5000"} (no key). This is a dedicated TOP-LEVEL GTM field — do NOT put it in `parameter`.
accountIdYes
eventNameNoCustom event name (for customEvent type).
parameterNoTrigger settings as a parameter list — e.g. a YouTube Video trigger's captureStart/progressThresholdsPercent, scroll thresholds, element-visibility selector. NOTE: a timer's interval/limit are the separate top-level `interval`/`limit` fields, NOT here.
containerIdYes
waitForTagsNoForm/link trigger: send a plain boolean (true/false). A Parameter {type:"boolean", value:"true"} is also accepted.
workspaceIdYes
parentFolderIdNo
autoEventFilterNoConditions for auto-event triggers (legacy; most scopes use `filter`).
checkValidationNoForm/link trigger: send a plain boolean (true/false). A Parameter object is also accepted.
intervalSecondsNoTimer trigger: firing interval in SECONDS as a single Parameter (no key). Top-level GTM field. Use interval (ms) OR intervalSeconds, not both.
customEventFilterNoUsed for custom event triggers.
waitForTagsTimeoutNoForm/link trigger: timeout in milliseconds. Send a plain number (e.g. 2000). A Parameter object is also accepted.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed13 schema fields changedv1.473.4
    • removedInput schema / properties / checkValidation / $ref
      Removed value: -"#/properties/eventName"
    • addedInput schema / properties / checkValidation / anyOf
      Added value: +[
      +  {
      +    "type": "boolean"
      +  },
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "$ref": "#/properties/eventName"
      +  }
      +]
    • changedInput schema / properties / checkValidation / description
      Previous value: -"Form/link trigger: a single boolean Parameter (no key)."New value: +"Form/link trigger: send a plain boolean (true/false). A Parameter object is also accepted."
    • addedInput schema / properties / filter / items / properties / parameter / description
      Added value: +"EXACTLY TWO entries, keyed arg0 then arg1. Example, a link click on a mailto: address: [{\"type\":\"template\",\"key\":\"arg0\",\"value\":\"{{Click URL}}\"},{\"type\":\"template\",\"key\":\"arg1\",\"value\":\"mailto:\"}] with condition type \"contains\"."
    • addedInput schema / properties / filter / items / properties / parameter / items / properties / key / description
      Added value: +"MUST be \"arg0\" or \"arg1\" — GTM accepts no other key here, and anything else fails with \"Parameter key is unknown\". arg0 is the LEFT side (the variable being tested), arg1 is the RIGHT side (the value compared against)."
    • addedInput schema / properties / filter / items / properties / parameter / items / properties / type / description
      Added value: +"Almost always \"template\"."
    • addedInput schema / properties / filter / items / properties / parameter / items / properties / value / description
      Added value: +"For arg0, a variable reference in double braces, e.g. \"{{Click URL}}\", \"{{_event}}\", \"{{Page Path}}\". For arg1, the literal to compare, e.g. \"mailto:\". A built-in variable referenced in arg0 must be ENABLED in the workspace first — see built_in_variables_enable (Click URL is \"clickUrl\", Click Text \"clickText\", Form ID \"formId\", and so on)."
    • removedInput schema / properties / waitForTags / $ref
      Removed value: -"#/properties/eventName"
    • addedInput schema / properties / waitForTags / anyOf
      Added value: +[
      +  {
      +    "type": "boolean"
      +  },
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "$ref": "#/properties/eventName"
      +  }
      +]
    • changedInput schema / properties / waitForTags / description
      Previous value: -"Form/link trigger: a single boolean Parameter {type:\"boolean\", value:\"true|false\"} (no key)."New value: +"Form/link trigger: send a plain boolean (true/false). A Parameter {type:\"boolean\", value:\"true\"} is also accepted."
    • removedInput schema / properties / waitForTagsTimeout / $ref
      Removed value: -"#/properties/eventName"
    • addedInput schema / properties / waitForTagsTimeout / anyOf
      Added value: +[
      +  {
      +    "type": "boolean"
      +  },
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "$ref": "#/properties/eventName"
      +  }
      +]
    • changedInput schema / properties / waitForTagsTimeout / description
      Previous value: -"Form/link trigger: a single template Parameter with the timeout ms."New value: +"Form/link trigger: timeout in milliseconds. Send a plain number (e.g. 2000). A Parameter object is also accepted."
  2. Changed4 schema fields changedv1.263.0
    • addedInput schema / properties / interval
      Added value: +{
      +  "$ref": "#/properties/eventName",
      +  "description": "Timer trigger: firing interval in MILLISECONDS as a single Parameter {type:\"template\", value:\"5000\"} (no key). This is a dedicated TOP-LEVEL GTM field — do NOT put it in `parameter`."
      +}
    • addedInput schema / properties / intervalSeconds
      Added value: +{
      +  "$ref": "#/properties/eventName",
      +  "description": "Timer trigger: firing interval in SECONDS as a single Parameter (no key). Top-level GTM field. Use interval (ms) OR intervalSeconds, not both."
      +}
    • addedInput schema / properties / limit
      Added value: +{
      +  "$ref": "#/properties/eventName",
      +  "description": "Timer trigger: max number of times the timer fires, as a single Parameter {type:\"template\", value:\"3\"} (no key). Dedicated TOP-LEVEL GTM field — do NOT put it in `parameter`."
      +}
    • changedInput schema / properties / parameter / description
      Previous value: -"Trigger settings as a parameter list — e.g. a YouTube Video trigger's captureStart/progressThresholdsPercent, a timer's interval/limit, scroll thresholds, element-visibility selector."New value: +"Trigger settings as a parameter list — e.g. a YouTube Video trigger's captureStart/progressThresholdsPercent, scroll thresholds, element-visibility selector. NOTE: a timer's interval/limit are the separate top-level `interval`/`limit` fields, NOT here."
  3. Changed6 schema fields changedv1.35.1
    • addedInput schema / properties / autoEventFilter
      Added value: +{
      +  "$ref": "#/properties/filter",
      +  "description": "Conditions for auto-event triggers (legacy; most scopes use `filter`)."
      +}
    • addedInput schema / properties / checkValidation
      Added value: +{
      +  "$ref": "#/properties/eventName",
      +  "description": "Form/link trigger: a single boolean Parameter (no key)."
      +}
    • changedInput schema / properties / filter / description
      Previous value: -"Conditions that must be met for the trigger to fire."New value: +"Conditions that must be met for the trigger to fire (\"fires on SOME …\")."
    • addedInput schema / properties / parameter
      Added value: +{
      +  "description": "Trigger settings as a parameter list — e.g. a YouTube Video trigger's captureStart/progressThresholdsPercent, a timer's interval/limit, scroll thresholds, element-visibility selector.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "key": {
      +        "description": "Parameter key/name (omit for entries inside a list).",
      +        "type": "string"
      +      },
      +      "list": {
      +        "description": "Child parameters when type=\"list\".",
      +        "items": {
      +          "$ref": "#/properties/parameter/items"
      +        },
      +        "type": "array"
      +      },
      +      "map": {
      +        "description": "Child parameters when type=\"map\".",
      +        "items": {
      +          "$ref": "#/properties/parameter/items"
      +        },
      +        "type": "array"
      +      },
      +      "type": {
      +        "description": "template | integer | boolean | list | map | tagReference | triggerReference | template",
      +        "type": "string"
      +      },
      +      "value": {
      +        "description": "Scalar value (template/integer/boolean/reference). May be a GTM variable like {{Click Text}}.",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / waitForTags
      Added value: +{
      +  "$ref": "#/properties/eventName",
      +  "description": "Form/link trigger: a single boolean Parameter {type:\"boolean\", value:\"true|false\"} (no key)."
      +}
    • addedInput schema / properties / waitForTagsTimeout
      Added value: +{
      +  "$ref": "#/properties/eventName",
      +  "description": "Form/link trigger: a single template Parameter with the timeout ms."
      +}
  4. First observedv1.0.0

TDQS

A3.7/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses the write nature via [WRITE] and the confirm requirement, but does not mention irreversibility, error behavior, success response, or other side effects. This is useful but limited.

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 is two sentences, front-loaded with [WRITE], and every word earns its place. No wasted text or redundant restating of the schema.

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?

For a 19-parameter write tool with no output schema and no annotations, the description is quite thin. It gives a prerequisite but no guidance on parameter selection, expected results, or failure modes. The schema provides substantial detail, but the description leaves the agent without high-level usage context.

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?

The description adds no parameter information beyond the schema. Schema coverage is 68% with detailed descriptions for most meaningful fields (e.g., filter, parameter, interval), but ID fields and confirm lack descriptions. Since coverage is moderate and the description is silent, it neither compensates nor repeats schema info.

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 'Create a GTM trigger' with a specific verb and resource, distinguishing it from sibling tools like triggers_update, triggers_get, and triggers_delete. The [WRITE] marker further clarifies its mutation nature.

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?

The description provides a clear prerequisite (GTM_MCP_ENABLE_WRITES=true and confirm=true) but does not explicitly state when to use this tool vs alternatives like triggers_update for existing triggers. Usage context is implied by the resource name rather than explicitly described.

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

Deploy Server

Other Tools