Skip to main content
Glama
Google Analytics MCP Server

Google Analytics MCP Server

get_report_metadata

Read-only

Retrieves official GA4 dimension and metric names, types, and descriptions, including custom definitions, so you can use exact fields in reports and filters.

Instructions

Get official GA4 dimension/metric names, types and descriptions.

Args: property_id: Numeric property ID or properties/ID. Use 0 for universal metadata only; use a real property to include its custom definitions.

Returns: Metadata including dimensions and metrics with api_name and custom_definition. Use these exact names in reports and filters.

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": {
      "property_id": "<property_id>"
    },
    "name": "get_report_metadata"
  }
}

Input Schema

NameRequiredDescriptionDefault
property_idYesNumeric GA4 property ID or properties/ID; metadata property 0 is universal

Output Schema

NameRequiredDescriptionDefault
nameNo
metricsNo
dimensionsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=true, so the safety profile is covered. The description adds that a real property expands results with custom definitions, which is useful behavioral context, but says nothing about latency, caching, or how large the metadata payload is — with a rich annotation set and an output schema, a 3 is appropriate.

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?

Front-loaded purpose sentence followed by Args/Returns sections; every line carries information (parameter values, return contents, and the downstream usage rule). No filler or repetition.

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 one-parameter read-only tool with an output schema, the definition covers purpose, parameter semantics, and the usage contract for the returned names. Return values are already described by the output schema, so the brief Returns note is sufficient; only cross-tool routing guidance is missing.

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?

With a single required parameter at 100% schema coverage, the baseline would be 3, but the description adds real meaning beyond the schema: it explains the semantic consequence of the 0 sentinel ('universal metadata only') versus a real property ('include its custom definitions'), which tells the agent how the value changes the result set.

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: retrieving official GA4 dimension/metric names, types, and descriptions. It is clearly distinguishable from report-running siblings, though it never names a sibling explicitly; the custom-definition distinction hints at get_custom_dimensions_and_metrics without directing the agent there.

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?

Provides concrete guidance on choosing property_id (0 for universal-only, a real property to include custom definitions) and on downstream use ('use these exact names in reports and filters'). However, it gives no explicit when-to-use/when-not guidance relative to siblings such as get_custom_dimensions_and_metrics or get_property_details, leaving that inference to the agent.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.