Skip to main content
Glama

analyticsadmin.properties.customMetrics.get

Retrieve a single Google Analytics custom metric definition by resource name and return it as JSON.

Instructions

Lookup for a single CustomMetric [HTTP GET]. Returns the requested resource as JSON — request bodies are built from the typed parameters (typed flags win over the params map), or read whole from body_file Siblings over the same resource: archive, create, list, patch.

Input Schema

NameRequiredDescriptionDefault
nameYes[URL path segment] Required. The name of the CustomMetric to get. Example format: properties/1234/customMetrics/5678
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.

Output Schema

NameRequiredDescriptionDefault
nameNo
scopeNo
descriptionNo
displayNameNo
parameterNameNo
measurementUnitNo
restrictedMetricTypeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / name / description
      Previous value: -"Required. The name of the CustomMetric to get. Example format: properties/1234/customMetrics/5678"New value: +"[URL path segment] Required. The name of the CustomMetric to get. Example format: properties/1234/customMetrics/5678"
    • addedInput schema / properties / name / pattern
      Added value: +"^properties/[^/]+/customMetrics/[^/]+$"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "description": {
      +      "type": "string"
      +    },
      +    "displayName": {
      +      "type": "string"
      +    },
      +    "measurementUnit": {
      +      "enum": [
      +        "MEASUREMENT_UNIT_UNSPECIFIED",
      +        "STANDARD",
      +        "CURRENCY",
      +        "FEET",
      +        "METERS",
      +        "KILOMETERS",
      +        "MILES",
      +        "MILLISECONDS",
      +        "SECONDS",
      +        "MINUTES",
      +        "HOURS"
      +      ],
      +      "type": "string"
      +    },
      +    "name": {
      +      "type": "string"
      +    },
      +    "parameterName": {
      +      "type": "string"
      +    },
      +    "restrictedMetricType": {
      +      "items": {
      +        "enum": [
      +          "RESTRICTED_METRIC_TYPE_UNSPECIFIED",
      +          "COST_DATA",
      +          "REVENUE_DATA"
      +        ],
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "scope": {
      +      "enum": [
      +        "METRIC_SCOPE_UNSPECIFIED",
      +        "EVENT"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

A3.5/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 full disclosure burden; it does declare the operation is an HTTP GET returning JSON, which tells the agent this is a non-mutating read. However, it says nothing about auth/permission requirements, error behavior for a missing or malformed name, or rate limits, and spends a sentence on body-construction mechanics that are irrelevant to a GET.

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 short sentences with the purpose and resource scope front-loaded, followed by the sibling enumeration. The body/params precedence clause is low-value for a GET call and could be dropped, but the text is compact overall.

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?

An output schema exists, so return values need not be explained, and the required path parameter is fully specified in the schema. Combined with the HTTP GET disclosure, an agent has enough to invoke it correctly; only permission/error context is missing, which is a minor gap for a simple read tool.

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 every parameter including `name` with its pattern and example is already documented in the schema. The description's only extra claim — typed parameters win over the `params` map and `body_file` can supply a body — restates the schema's own wording and is boilerplate for this endpoint, so baseline 3 applies.

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?

States a specific verb and resource ("Lookup for a single CustomMetric") and explicitly separates itself from the sibling operations over the same resource (archive, create, list, patch). The only weakness is the slightly loose verb "Lookup" and the prefixed HTTP GET note, but an agent can still tell it retrieves exactly one CustomMetric.

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?

Naming the sibling set implies when to use this tool (single-resource retrieval versus list/create/patch), but the description never states a condition such as "use list to enumerate" or any prerequisite like required permissions or a fully-qualified resource name. Usage has to be inferred rather than read.

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