Skip to main content
Glama
Google Workspace MCP connector

Google Workspace MCP connector

by animesh-ex

gtm_add_event_trigger

Creates a Google Tag Manager Custom Event trigger that fires when the data layer pushes a specified event or regex, returns its ID, and reuses identical triggers.

Instructions

Create a Custom Event trigger that fires when the site pushes { event: '' } to the dataLayer (optionally a regex of several events). Returns the trigger ID. Reuses an identical existing trigger.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "workspace": "<workspace>",
      "eventName": "<eventName>"
    },
    "name": "gtm_add_event_trigger"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNo
regexNo
eventNameYese.g. add_to_cart, or a regex like ^(add_to_cart|purchase)$ with regex=true
workspaceYesWorkspace path (accounts/…/containers/…/workspaces/…), or a container public ID like GTM-XXXX (uses its Default Workspace)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.7.0

TDQS

A4/5.0
Behavior4/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false, openWorldHint=true), the description discloses two valuable behavioral traits: it returns the trigger ID and it reuses an identical existing trigger instead of duplicating. It does not mention permission/workspace prerequisites or that changes stay unpublished in a workspace, which would be the remaining mutation context.

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?

Three short sentences, front-loaded with the core action and mechanism, then output and reuse behavior. Every clause carries information an agent needs; nothing is redundant or padded.

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?

The tool is a low-complexity mutation with annotations and no output schema, and the description covers the mechanism, the regex option, and the return value. Minor gaps remain around container-modification side effects (unpublished workspace changes, permissions) and the unexplained 'name' parameter.

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?

With only 50% schema description coverage, the description adds real meaning for eventName and regex by pairing them ('optionally a regex of several events') and giving the dataLayer shape to match against. It says nothing about the 'name' parameter (undocumented in the schema too) or how the name interacts with the reuse-identical-trigger behavior, so it only partly compensates for the coverage gap.

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 and resource ('Create a Custom Event trigger') and explains the exact firing mechanism (a dataLayer push of { event: '<eventName>' }), including the regex variant. This is clearly distinguishable from the GTM siblings such as gtm_add_ga4_tags or gtm_add_datalayer_variables, which create different resource types.

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 scenario in which this trigger is appropriate is implied by the dataLayer-push explanation, so an agent can infer when to reach for it. However, it never states when NOT to use it or names an alternative (e.g. a different trigger type or gtm_add_ga4_tags for tag creation), so guidance is inferred rather than explicit.

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