Skip to main content
Glama

Google Ads & Meta Ads

Google Analytics: Get Custom Dimensions And Metrics

ga4_get_custom_dimensions_and_metrics
Read-onlyIdempotent

List the custom dimensions and custom metrics defined on one GA4 property of the user's connected Google Analytics login, with the apiName to use in ga4_run_report (customEvent:…, customUser:…, customItem:…) and each one's display name and description. Standard dimensions and metrics are not listed — they are the same for every property and documented at https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema. Read-only.

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": "ga4_get_custom_dimensions_and_metrics"
  }
}

Input Schema

NameRequiredDescriptionDefault
property_idYesThe GA4 property: its number (123456789) or properties/123456789. Must be one of the properties ga4_get_account_summaries lists for the connected login.

Output Schema

NameRequiredDescriptionDefault
propertyYesproperties/<number>.
customMetricsYesCustom metrics.
customDimensionsYesCustom dimensions.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and non-destructive behavior, so the trailing 'Read-only.' is largely redundant. Beyond that, the description adds real context: the shape of the apiName prefixes, the fact that the listing is scoped to the connected login's property, and the prerequisite relationship to ga4_get_account_summaries.

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 sentences, front-loaded with the resource and the reason to call it, with no filler. The closing 'Read-only.' repeats annotation data and could be dropped, but the rest is dense and well ordered.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter read tool with full annotation coverage and an output schema, the description supplies everything needed: scope, what is returned, the exclusion for standard metrics, and the downstream consumer of the apiName values. Nothing required to invoke it correctly is missing.

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%, and the schema already explains the property number vs. properties/123456789 format and the requirement that it come from ga4_get_account_summaries. The description adds only the framing 'one GA4 property of the user's connected Google Analytics login,' which is marginal over the schema.

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 ('List the custom dimensions and custom metrics') scoped to one GA4 property, and clarifies it returns apiName, display name, and description. It also draws an explicit boundary against standard dimensions/metrics, so an agent can separate this from ga4_run_report, which consumes the apiName values returned here.

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?

Clearly frames the use case — obtain apiName values (customEvent:, customUser:, customItem:) to feed into ga4_run_report — and explicitly excludes standard dimensions/metrics, redirecting to the API schema doc. It does not name a sibling tool for the standard-metric case, but the exclusion itself is a usable boundary.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources