Skip to main content
Glama
Samarth GTM MCP Server

Samarth GTM MCP Server

Official

ga4_update_measurement_protocol_secret

Rename a GA4 Measurement Protocol secret by updating only the fields you change; write access and confirm=true are required to apply it.

Instructions

[GA4 WRITE] Rename a Measurement Protocol secret. 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>",
      "displayName": "<displayName>",
      "confirm": "<confirm>"
    },
    "name": "ga4_update_measurement_protocol_secret"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesFull resource name of the Measurement Protocol secret to target: "properties/{property}/dataStreams/{stream}/measurementProtocolSecrets/{id}".
confirmYesMust be true to apply the change.
updateMaskNoComma-separated field paths to update. Omit to derive from the supplied fields.
displayNameYes

Schema Changelog

Changes observed during successful MCP inspections.

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

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations supplied, the description must carry the behavioral load. It usefully discloses that this is a write operation gated behind an environment flag and an explicit confirm=true, and explains updateMask derivation including the nested-path override. It stops short of saying what the response contains or confirming that unmentioned fields are left untouched.

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, front-loaded with the '[GA4 WRITE]' tag and the verb+resource, then the field/updateMask rule, then the gating requirements. Nothing is redundant and no sentence can be dropped without losing information.

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?

For a four-parameter rename tool with no output schema and no annotations, the description covers the important unknowns: it is a write, it requires two explicit gates, and updateMask is auto-derived. A brief note on the return value or preservation of other fields would make it 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 coverage is 75%, so most parameters are already documented. The description reinforces the updateMask derivation rule and the 'pass only fields to change' pattern, which is meaningful added meaning for updateMask and confirm, but 'displayName' is never characterized in the description (its schema entry has no description either).

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 states a specific verb ('Rename') and resource ('Measurement Protocol secret'), and the '[GA4 WRITE]' tag flags the operation class immediately. It is clearly separable from the create/delete siblings by the verb alone, though it never names them explicitly.

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 gives operational prerequisites (GA4_MCP_ENABLE_WRITES=true, confirm=true) and instructs to pass only changed fields, which implies this is for partial modifications. However, it offers no explicit when-to-use vs. when-not guidance relative to the sibling update tools or the create/delete secret tools.

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