Skip to main content
Glama

analyticsdata.properties.getMetadata

Retrieves available dimensions and metrics metadata for a Google Analytics property, including custom fields and universal metadata, to help explore reporting options.

Instructions

Returns metadata for dimensions and metrics available in reporting methods. Used to explore the dimensions and metrics. In this method, a Google Analytics property identifier is specified in the request, and the metadata response includes Custom dimensions and metrics as well as Universal metadata. For example if a custom metric with parameter name levels_unlocked is registered to a property, the Metadata response will contain customEvent:levels_unlocked. Universal metadata are dimensions and metrics applicable to any property such as country and totalUsers [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: batchRunPivotReports, batchRunReports, checkCompatibility, runPivotReport, runRealtimeReport, runReport.

Input Schema

NameRequiredDescriptionDefault
nameYes[URL path segment] Required. The resource name of the metadata to retrieve. This name field is specified in the URL path and not URL parameters. Property is a numeric Google Analy
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
metricsNo
dimensionsNo
comparisonsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / name / description
      Previous value: -"Required. The resource name of the metadata to retrieve. This name field is specified in the URL path and not URL parameters. Property is a numeric Google Analy"New value: +"[URL path segment] Required. The resource name of the metadata to retrieve. This name field is specified in the URL path and not URL parameters. Property is a numeric Google Analy"
    • addedInput schema / properties / name / pattern
      Added value: +"^properties/[^/]+/metadata$"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "comparisons": {
      +      "items": {
      +        "properties": {
      +          "apiName": {
      +            "type": "string"
      +          },
      +          "description": {
      +            "type": "string"
      +          },
      +          "uiName": {
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "dimensions": {
      +      "items": {
      +        "properties": {
      +          "apiName": {
      +            "type": "string"
      +          },
      +          "category": {
      +            "type": "string"
      +          },
      +          "customDefinition": {
      +            "type": "boolean"
      +          },
      +          "deprecatedApiNames": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "description": {
      +            "type": "string"
      +          },
      +          "uiName": {
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "metrics": {
      +      "items": {
      +        "properties": {
      +          "apiName": {
      +            "type": "string"
      +          },
      +          "blockedReasons": {
      +            "items": {
      +              "enum": [
      +                "BLOCKED_REASON_UNSPECIFIED",
      +                "NO_REVENUE_METRICS",
      +                "NO_COST_METRICS"
      +              ],
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "category": {
      +            "type": "string"
      +          },
      +          "customDefinition": {
      +            "type": "boolean"
      +          },
      +          "deprecatedApiNames": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "description": {
      +            "type": "string"
      +          },
      +          "expression": {
      +            "type": "string"
      +          },
      +          "type": {
      +            "enum": [
      +              "METRIC_TYPE_UNSPECIFIED",
      +              "TYPE_INTEGER",
      +              "TYPE_FLOAT",
      +              "TYPE_SECONDS",
      +              "TYPE_MILLISECONDS",
      +              "TYPE_MINUTES",
      +              "TYPE_HOURS",
      +              "TYPE_STANDARD",
      +              "TYPE_CURRENCY",
      +              "TYPE_FEET",
      +              "TYPE_MILES",
      +              "TYPE_METERS",
      +              "TYPE_KILOMETERS"
      +            ],
      +            "type": "string"
      +          },
      +          "uiName": {
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "name": {
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does reasonably well: it discloses [HTTP GET] (read-only, non-mutating), explains that the response includes both custom and universal metadata, gives a concrete naming example, and clarifies request construction precedence (typed flags win over the params map; body_file overrides). It omits auth/quota requirements and pagination, so it is not exhaustive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core purpose is front-loaded, but the description then wanders into a multi-sentence explanation of custom vs universal metadata plus generic boilerplate about body_file/params that is repeated across sibling tools, and trails off into an unexplained sibling list. Several sentences do not earn their place for a simple read-metadata endpoint.

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 described, and the schema fully covers the five parameters. For a read-only discovery call the description supplies enough — what it returns, that it is a GET, and how the request is assembled — though it stops short of explicitly situating itself relative to the reporting siblings it lists.

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 name, query, params, dry_run, and body_file; baseline is 3. The description reiterates that the property identifier goes in the request/path and gives an example of what metadata looks like, but adds no syntax or meaning for the other four parameters beyond what the schema states.

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 and resource: returns metadata for dimensions and metrics available in reporting methods, with concrete examples (customEvent:levels_unlocked, country, totalUsers). It names its sibling tools (runReport, checkCompatibility, etc.) but does not explicitly articulate how its output differs from theirs, keeping it just short of a 5.

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?

'Used to explore the dimensions and metrics' implies a discovery role, and the sibling list is provided, but the description never says explicitly when to call this instead of runReport — e.g., 'call this first to discover valid dimension/metric names before running a report.' The routing is left to inference.

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