Skip to main content
Glama

analyticsadmin.properties.dataStreams.measurementProtocolSecrets.create

Creates a Measurement Protocol secret for a Google Analytics 4 data stream and returns the new secret as JSON; blocked in read-only profiles.

Instructions

Creates a measurement protocol secret [HTTP POST] — creates or triggers a change; 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: delete, get, list, patch.

Input Schema

NameRequiredDescriptionDefault
queryNoExtra KEY=VALUE query pairs for endpoints whose parameters Discovery does not describe.
paramsNoParameter map merged into the request; typed parameters win.
parentYes[URL path segment] Required. The parent resource where this secret will be created. Format: properties/{property}/dataStreams/{dataStream}
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.
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. Changed3 schema fields changed
    • changedInput schema / properties / parent / description
      Previous value: -"Required. The parent resource where this secret will be created. Format: properties/{property}/dataStreams/{dataStream}"New value: +"[URL path segment] Required. The parent resource where this secret will be created. Format: properties/{property}/dataStreams/{dataStream}"
    • addedInput schema / properties / parent / pattern
      Added value: +"^properties/[^/]+/dataStreams/[^/]+$"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "displayName": {
      +      "type": "string"
      +    },
      +    "name": {
      +      "type": "string"
      +    },
      +    "secretValue": {
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  3. First observed

TDQS

A4.3/5.0
Behavior4/5

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

No annotations, so the description carries the burden and does well: it marks this as an HTTP POST mutation, notes --readonly refusal, and describes the return as a JSON response resource. It omits auth/permission requirements and whether secretValue is only returned once, which for a secret-creating tool would be valuable caveats.

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?

Efficient and front-loaded with the action and safety note; the body/passing details and sibling list follow logically. Dense but each clause carries 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?

A mutation tool with no annotations and an output schema; the description covers action, safety refusal, body construction, and return type, which is adequate. Auth scopes and secret-value sensitivity are the notable omissions.

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 100%, so baseline is 3, but the description adds real value: it enumerates the body fields (displayName, name, secretValue) and clarifies the pass mechanism (via `params` or whole via `body_file`).

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 and resource (creates a measurement protocol secret) and distinguishes it from siblings by naming the resource family (delete, get, list, patch). An agent can identify it without opening the schema.

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?

It discloses when the tool will be refused (--readonly safety profiles) and lists sibling operations over the same resource, which implies create-vs-read/edit routing. It doesn't explicitly say 'use get/list to read before creating', but the context is clear.

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