Skip to main content
Glama
Samarth GTM MCP Server

Samarth GTM MCP Server

Official

ga4_create_data_stream

Creates a GA4 data stream for web, Android, or iOS properties, requiring writes enabled and explicit confirmation before applying changes.

Instructions

[GA4 WRITE] Create a data stream (web / Android / iOS). 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>",
      "type": "<type>",
      "displayName": "<displayName>",
      "confirm": "<confirm>"
    },
    "name": "ga4_create_data_stream"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyNoRaw request-body object (JSON) merged OVER the typed fields — use for nested/advanced fields not exposed as flat args.
typeYesStream type.
confirmYesMust be true to apply the change.
bundleIdNoFor IOS streams: the app bundle id.
propertyYesGA4 property ID, e.g. "123456789" or "properties/123456789".
defaultUriNoFor WEB streams: the site URL (sets webStreamData.defaultUri).
displayNameYes
packageNameNoFor ANDROID streams: the app package name.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.497.5
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / body / propertyNames
      Added value: +{
      +  "type": "string"
      +}
    • 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

A3.5/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full behavioral burden. It does disclose the two most important traits: this is a write operation and it is gated behind an env flag plus an explicit confirm=true. It says nothing about permissions/scopes, idempotency or duplicate handling, or what the call returns.

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?

Two sentences with zero waste: the [GA4 WRITE] tag flags the mutation class up front, then the verb+resource, then the gating requirements. Nothing is buried or repeated.

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 create tool with 8 parameters, a nested body object, and no output schema or annotations, the definition covers the critical invocation gate but leaves the agent without return-value expectations or failure modes. It is minimally sufficient rather than complete.

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 88%, so the schema already explains property, type, displayName, defaultUri, packageName, bundleId, body, and confirm. The description adds no field-level meaning beyond restating the three stream types, so the baseline of 3 applies.

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?

The description gives a specific verb+resource ("Create a data stream") and enumerates the supported stream variants (web / Android / iOS), which maps directly to the type enum. It is clearly distinct from the delete/update/list siblings by verb alone, though it never explicitly names them.

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?

It states hard prerequisites for invocation (GA4_MCP_ENABLE_WRITES=true and confirm=true), which is genuinely actionable. However, there is no guidance on when to create a new stream versus modifying an existing one with ga4_update_data_stream, and no note on preconditions such as whether the property must already exist.

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