Skip to main content
Glama
Samarth GTM MCP Server

Samarth GTM MCP Server

Official

ga4_update_key_event

Update a GA4 key event by changing fields such as counting method or default value; only supplied fields are changed, with updateMask derived automatically. Requires writes enabled and confirm=true.

Instructions

[GA4 WRITE] Update a key event (e.g. its counting method or default value via body). Pass only the fields to change; updateMask is derived from them (override with an explicit updateMask for nested paths). 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": {
      "name": "<name>",
      "confirm": "<confirm>"
    },
    "name": "ga4_update_key_event"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyNoRaw request-body object (JSON) merged OVER the typed fields — use for nested/advanced fields not exposed as flat args.
nameYesFull resource name of the key event to target: "properties/{property}/keyEvents/{id}".
confirmYesMust be true to apply the change.
updateMaskNoComma-separated field paths to update. Omit to derive from the supplied fields.
countingMethodNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv1.497.5
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / body / propertyNames
      Added value: +{
      +  "type": "string"
      +}
    • changedInput schema / properties / name / description
      Previous value: -"Full resource name of the key event to target, e.g. \"properties/123/…/456\"."New value: +"Full resource name of the key event to target: \"properties/{property}/keyEvents/{id}\"."
    • removedInput schema / properties / name / minLength
      Removed value: -1
    • addedInput schema / properties / name / pattern
      Added value: +"^\\s*properties\\/\\d+\\/keyEvents\\/[A-Za-z0-9_-]+\\s*$"
  2. Addedv1.421.0
  3. Removedv1.350.0
  4. Addedv1.160.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does well: it declares this is a write operation, discloses the two gating prerequisites (env flag and confirm), and explains the updateMask derivation plus the body-merge-over-typed-fields behavior. It omits return shape and whether the update is idempotent or can fail on unknown paths.

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?

Three densely packed sentences, front-loaded with the action and followed by mechanics and prerequisites; nothing is wasted. The mention of a "default value" field that is not present as a flat parameter is the only mildly loose element.

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?

A mutation tool with 5 params, nested body, and no output schema: the description covers write gating, field selection, and mask derivation, which are the decisions an agent must make to call it correctly. What it returns is left unstated, a minor gap given no output schema exists.

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 coverage is 80%, so the schema already documents name, confirm, body, updateMask, and countingMethod. The description adds genuine meaning about updateMask being derived from supplied fields and overridable for nested paths, but adds nothing about the countingMethod enum trade-off or the name pattern. Baseline 3 fits given the schema does most of the work.

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?

Uses a specific verb and resource ("Update a key event") and names the changable fields (counting method, default value) plus the [GA4 WRITE] prefix. It is distinguishable from create/delete/list key-event siblings by the verb, though it never explicitly contrasts them.

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 clear operating context: pass only fields to change, confirm=true, and GA4_MCP_ENABLE_WRITES=true must be set. It does not state when to prefer it over siblings such as ga4_create_key_event or ga4_delete_key_event, so alternatives remain inferred.

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