Skip to main content
Glama
dienhokhanh

ga4-mcp-server

by dienhokhanh

Check dimension/metric compatibility

check_compatibility
Read-only

Confirm GA4 dimensions and metrics pair correctly in a single report and get back any conflicts. Call before creating reports combining item-scope and session-scope fields.

Instructions

Check whether a set of dimensions and metrics can be used together in one report. Returns the incompatible fields (if any). Use before run_report when mixing scopes, e.g. item-scoped with session-scoped fields.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
metricsNo
propertyNoGA4 property: numeric ID ("123456789"), resource name ("properties/123456789") or display name ("My Website"). Defaults to GA4_DEFAULT_PROPERTY if set.
dimensionsNo
metricFilterNoA GA4 Data API FilterExpression object. Examples: {"filter":{"fieldName":"country","stringFilter":{"matchType":"EXACT","value":"United States"}}} {"filter":{"fieldName":"eventName","inListFilter":{"values":["purchase","sign_up"]}}} {"filter":{"fieldName":"sessions","numericFilter":{"operation":"GREATER_THAN","value":{"int64Value":"100"}}}} {"andGroup":{"expressions":[<expr>,<expr>]}} · {"orGroup":{"expressions":[...]}} · {"notExpression":<expr>} stringFilter.matchType: EXACT | BEGINS_WITH | ENDS_WITH | CONTAINS | FULL_REGEXP | PARTIAL_REGEXP. Use dimension fields in dimensionFilter and metric fields in metricFilter.
dimensionFilterNoA GA4 Data API FilterExpression object. Examples: {"filter":{"fieldName":"country","stringFilter":{"matchType":"EXACT","value":"United States"}}} {"filter":{"fieldName":"eventName","inListFilter":{"values":["purchase","sign_up"]}}} {"filter":{"fieldName":"sessions","numericFilter":{"operation":"GREATER_THAN","value":{"int64Value":"100"}}}} {"andGroup":{"expressions":[<expr>,<expr>]}} · {"orGroup":{"expressions":[...]}} · {"notExpression":<expr>} stringFilter.matchType: EXACT | BEGINS_WITH | ENDS_WITH | CONTAINS | FULL_REGEXP | PARTIAL_REGEXP. Use dimension fields in dimensionFilter and metric fields in metricFilter.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so safety is covered. The description adds genuine value beyond that: it discloses the return content (incompatible fields, if any) and its role as a pre-flight validation step rather than a data-fetching call.

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?

Two sentences, entirely front-loaded: the capability first, then the return contract, then the usage trigger. No filler or restated metadata.

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 read-only, no-output-schema validation tool, the description supplies the essential pieces: what it validates, what it returns, and when to call it. The heavy nested filter parameters are documented in the schema, so nothing critical is missing from the description.

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?

At 60% schema description coverage, the schema carries most of it — property, metricFilter and dimensionFilter are richly documented there, while the metrics/dimensions arrays are not. The description only implicitly signals that dimensions and metrics are the inputs, adding no format, scoping, or filter semantics of its own.

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 (check), resource (dimensions and metrics), and outcome (whether they can be used together in one report, plus the incompatible fields returned). It is clearly distinguished from sibling run_report, which actually executes the report.

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?

Gives explicit sequencing guidance — 'Use before run_report when mixing scopes, e.g. item-scoped with session-scoped fields' — and names the tool it precedes. It does not state when the check is unnecessary (i.e. homogeneous scopes), so the when-not case is left implied rather than explicit.

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