Skip to main content
Glama
Samarth GTM MCP Server

Samarth GTM MCP Server

Official

ga4_update_enhanced_measurement

Updates a GA4 web data stream's Enhanced Measurement settings, including master and per-signal toggles for scrolls, outbound clicks, site search, video, downloads, forms, and SPA page changes.

Instructions

[GA4 WRITE] Update a WEB data stream's Enhanced Measurement: master streamEnabled plus per-signal toggles (scrolls, outbound clicks, site search + query params, video engagement, file downloads, form interactions, SPA page changes). 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_update_enhanced_measurement"
  }
}

Input Schema

NameRequiredDescriptionDefault
confirmYesMust be true to apply the change.
propertyYesGA4 property ID, e.g. "123456789" or "properties/123456789".
dataStreamIdYesData stream ID (numeric) or "dataStreams/{id}".
streamEnabledNo
scrollsEnabledNo
siteSearchEnabledNo
uriQueryParameterNo
pageChangesEnabledNo
fileDownloadsEnabledNo
searchQueryParameterNoComma-separated site-search query params, e.g. "q,s,search".
outboundClicksEnabledNo
videoEngagementEnabledNo
formInteractionsEnabledNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv1.497.5
    • removedInput schema / additionalProperties
      Removed value: -false
    • 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

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden; it does disclose the write gate (env flag + confirm) and the web-stream restriction, which is valuable context an agent cannot get elsewhere. However, for a toggle-style mutation it never states update semantics: whether omitted booleans leave existing settings untouched (patch) or reset them (replace), nor what the response contains or what errors occur when writes are disabled. Those omissions matter most for this tool's core risk profile.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the WRITE tag, verb, and target scope, then the prerequisites. The signal list is long but each item disambiguates a distinct boolean, so little is waste; the phrasing is dense yet readable.

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 13-parameter mutation tool with no annotations and no output schema, the definition covers targeting and gating well but omits partial-vs-full update semantics, validation rules (property must host the given stream), and result/error shape. Completeness is adequate to attempt the call, not to predict its effects.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 31% (10 of 13 params undocumented), so the description must compensate, and it largely does: the parenthetical maps scrolls/outboundClicks/videoEngagement/fileDownloads/formInteractions/pageChanges to their meaning and flags site search as carrying query parameters. It still leaves uriQueryParameter undefined versus the documented searchQueryParameter, leaving a real ambiguity between the two query-param fields.

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 (Update) and a tightly scoped resource ('a WEB data stream's Enhanced Measurement'), then enumerates the exact sub-resources touched (master streamEnabled plus scrolls, outbound clicks, site search, video, downloads, forms, SPA). The '[GA4 WRITE]' tag and 'WEB' qualifier separate it from the read-side sibling and from other ga4_update_* tools targeting properties, links, or stream-level settings.

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?

Gives real preconditions: GA4_MCP_ENABLE_WRITES=true and confirm=true must be set, which is exactly what an agent needs before attempting the call. It also implicitly restricts the target to web streams only. It stops short of naming ga4_enhanced_measurement_get as the read counterpart or of stating when a specialized sibling like ga4_update_data_stream should be used instead.

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