Skip to main content
Glama
Google Analytics MCP Server

Google Analytics MCP Server

check_compatibility

Read-only

Checks whether GA4 dimensions and metrics are compatible before reporting, returning per-field compatibility and official metadata so incompatible fields are identified as data rather than errors.

Instructions

Check field compatibility through the official GA4 Data API.

Args: property_id: Numeric property ID or properties/ID. dimensions: Up to 9 exact standard or custom dimension API names. metrics: Up to 10 exact standard or custom metric API names. dimension_filter: Optional snake_case GA4 FilterExpression for dimensions. metric_filter: Optional snake_case GA4 FilterExpression for metrics.

Returns: Per-field dimension_compatibilities and metric_compatibilities, each with compatibility and official field metadata. Incompatible fields are returned as data, not raised as an execution error.

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>",
      "dimensions": "<dimensions>",
      "metrics": "<metrics>"
    },
    "name": "check_compatibility"
  }
}

Input Schema

NameRequiredDescriptionDefault
metricsYes
dimensionsYes
property_idYesNumeric GA4 property ID or properties/ID; metadata property 0 is universal
metric_filterNo
dimension_filterNo

Output Schema

NameRequiredDescriptionDefault
metric_compatibilitiesNo
dimension_compatibilitiesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover read-only/non-destructive/open-world, but the description adds genuinely non-obvious behavior: incompatible fields are returned as data rather than raised as an execution error, and per-field official metadata is included. That is exactly the kind of detail an agent cannot infer from annotations or schema.

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?

Front-loaded with the one-line purpose, then Args/Returns sections that map directly onto schema fields. Minor waste in repeating the 9 and 10 maxItems already encoded in the schema, but the structure is easy to scan.

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 five-parameter read-only check tool with an output schema, the key facts are present: every parameter is explained, the not-an-error return behavior is stated, and the return shape is summarized. Only auth/prerequisite context and a pointer to the downstream report tool are 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 only 20% schema description coverage, the description carries the load and does so well: it clarifies that dimensions/metrics must be exact standard or custom API names, restates the 9/10 caps, and explains that the filters are optional snake_case GA4 FilterExpression objects, which the schema leaves as untyped additionalProperties objects.

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 ('Check field compatibility') and names the upstream authority (the official GA4 Data API). It is clearly distinct from report-running siblings like run_report or get_report_metadata, though it doesn't explicitly frame the purpose as pre-flight validation of a dimension/metric pairing.

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?

Usage is only implied: the tool is obviously a validation step, but the description never says when to call it (e.g., before run_report) or what alternative to use if you already know the fields are valid. No exclusions or prerequisites are given.

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