Skip to main content
Glama

analyticsadmin.properties.dataStreams.measurementProtocolSecrets.patch

Updates a Google Analytics measurement protocol secret via PATCH, letting you change fields such as display name or secret value for a property data stream.

Instructions

Updates a measurement protocol secret [HTTP PATCH] — updates the resource; refused under --readonly safety profiles. Returns the API's response resource as JSON — request body is a JSON GoogleAnalyticsAdminV1betaMeasurementProtocolSecret object accepting displayName, name, secretValue; pass it via params or whole via body_file Siblings over the same resource: create, delete, get, list.

Input Schema

NameRequiredDescriptionDefault
nameYes[URL path segment] Identifier. Resource name of this secret. This secret may be a child of any type of stream. Format: properties/{property}/dataStreams/{dataStream}/measurementPr
queryNoExtra KEY=VALUE query pairs for endpoints whose parameters Discovery does not describe.
paramsNoParameter map merged into the request; typed parameters win.
dry_runNoReturn the request that would be sent, without sending it.
body_fileNoRead the request body from this file ('-' for stdin) instead of building one from the parameters. The body is a JSON GoogleAnalyticsAdminV1betaMeasurementProtocolSecret object.
updateMaskNo[query parameter] Required. The list of fields to be updated. Omitted fields will not be updated.
request_bodyNoRequest body of type GoogleAnalyticsAdminV1betaMeasurementProtocolSecret: pass it via `params` (merged into the built body) or whole via `body_file`.

Output Schema

NameRequiredDescriptionDefault
nameNo
displayNameNo
secretValueNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / body_file / description
      Previous value: -"Read the request body from this file ('-' for stdin) instead of building one from the parameters."New value: +"Read the request body from this file ('-' for stdin) instead of building one from the parameters. The body is a JSON GoogleAnalyticsAdminV1betaMeasurementProtocolSecret object."
    • addedInput schema / properties / request_body
      Added value: +{
      +  "description": "Request body of type GoogleAnalyticsAdminV1betaMeasurementProtocolSecret: pass it via `params` (merged into the built body) or whole via `body_file`.",
      +  "properties": {
      +    "displayName": {
      +      "type": "string"
      +    },
      +    "name": {
      +      "type": "string"
      +    },
      +    "secretValue": {
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  2. Changed5 schema fields changed
    • changedInput schema / properties / name / description
      Previous value: -"Identifier. Resource name of this secret. This secret may be a child of any type of stream. Format: properties/{property}/dataStreams/{dataStream}/measurementPr"New value: +"[URL path segment] Identifier. Resource name of this secret. This secret may be a child of any type of stream. Format: properties/{property}/dataStreams/{dataStream}/measurementPr"
    • addedInput schema / properties / name / pattern
      Added value: +"^properties/[^/]+/dataStreams/[^/]+/measurementProtocolSecrets/[^/]+$"
    • changedInput schema / properties / updateMask / description
      Previous value: -"Required. The list of fields to be updated. Omitted fields will not be updated."New value: +"[query parameter] Required. The list of fields to be updated. Omitted fields will not be updated."
    • addedInput schema / properties / updateMask / format
      Added value: +"google-fieldmask"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "displayName": {
      +      "type": "string"
      +    },
      +    "name": {
      +      "type": "string"
      +    },
      +    "secretValue": {
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  3. First observed

TDQS

A3.9/5.0
Behavior3/5

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

No annotations are provided, so the description carries the disclosure burden. It usefully states that this is an HTTP PATCH mutation, that it is refused under readonly safety profiles, and that it returns the API response resource as JSON; however, it does not explain permission requirements, reversibility, or other side effects beyond the basic safety-profile constraint.

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?

The description is front-loaded with the core action and resource, and it avoids unnecessary filler. It is somewhat dense as a single run-on sentence with several em-dash clauses, but the information is relevant and efficiently packed.

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?

The description covers the key facts needed to invoke this tool: it is an update/PATCH operation, it is blocked under readonly safety profiles, it returns the API response resource, and the body can be supplied via `params` or `body_file`. With a full output schema and 100% parameter schema coverage, the remaining gaps around permissions are not fatal, though they prevent a top score.

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 the schema already documents all seven parameters in detail. The description mentions the request-body fields displayName, name, and secretValue and explains that the body may be passed via `params` or `body_file`, but this largely repeats what the schema already states rather than adding new semantic meaning.

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?

The description gives a specific verb and resource: "Updates a measurement protocol secret", and identifies the HTTP method as PATCH. It also names the sibling operations over the same resource (create, delete, get, list), so an agent can distinguish this mutation tool from the read and creation alternatives.

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?

The description clearly frames this as the update operation and explicitly notes that it is "refused under --readonly safety profiles", which is a useful when-not condition. It names the sibling operations as alternatives, though it does not give detailed selection criteria for choosing patch over those operations beyond the implied update/read/create/delete split.

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