Skip to main content
Glama
Samarth GTM MCP Server

Samarth GTM MCP Server

Official

ga4_create_event_create_rule

Create a GA4 event-create rule on a data stream to generate new server-side events from event conditions and parameter mutations. Supply conditions in the request body and confirm to apply.

Instructions

[GA4 WRITE] Create an event-create rule on a data stream (server-side event creation). Supply eventConditions/parameterMutations via body. Requires GA4_MCP_ENABLE_WRITES=true and confirm=true.

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": {
      "property": "<property>",
      "dataStreamId": "<dataStreamId>",
      "confirm": "<confirm>"
    },
    "name": "ga4_create_event_create_rule"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyNoRaw request-body object (JSON) merged OVER the typed fields — use for nested/advanced fields not exposed as flat args.
confirmYesMust be true to apply the change.
propertyYesGA4 property ID, e.g. "123456789" or "properties/123456789".
dataStreamIdYesData stream ID (numeric) or "dataStreams/{id}".
destinationEventNoName of the new event this rule creates.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv1.497.5
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / body / propertyNames
      Added value: +{
      +  "type": "string"
      +}
    • removedInput schema / properties / dataStreamId / minLength
      Removed value: -1
    • addedInput schema / properties / dataStreamId / pattern
      Added value: +"^\\s*(dataStreams\\/)?\\d+\\s*$"
    • removedInput schema / properties / property / minLength
      Removed value: -1
    • addedInput schema / properties / property / pattern
      Added value: +"^\\s*(properties\\/)?\\d+\\s*$"
  2. Addedv1.421.0
  3. Removedv1.350.0
  4. Addedv1.160.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does well: it flags the tool as a WRITE, discloses the environment-variable write gate, and states that confirm=true is mandatory to apply the change. It stops short of saying whether the rule takes effect immediately on live traffic or whether the operation is reversible, which would be valuable for a mutation on production analytics.

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 tight sentences with a bracketed write-marker front-loaded. The write gate and confirm requirement come before the payload hint, so the most decision-relevant information is up front and nothing is 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?

Given five parameters, a nested free-form body object, and no output schema, the description covers prerequisites, purpose, and payload routing adequately. The remaining gap is what the created rule will actually do at runtime (the semantics of conditions and mutations) and what the response returns, though the absence of an output schema makes the latter only a minor omission.

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 100%, so all five parameters (including the nested body object) are already documented, giving a baseline of 3. The description does add real value by naming which payloads — eventConditions and parameterMutations — belong inside `body` rather than as flat arguments, but it leaves destinationEvent and the property/dataStreamId formats to the schema.

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 an event-create rule on a data stream' — and adds the clarifying gloss '(server-side event creation)' so an agent knows this is not a client-side tag. The name-plus-description pair cleanly separates it from the delete/update event_create_rule siblings.

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?

Explicitly states the two prerequisites for invocation (GA4_MCP_ENABLE_WRITES=true and confirm=true), which is the key gating an agent needs to know before attempting a write. It does not say when to prefer create vs update on an existing rule, but the resource scope makes that largely self-evident.

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