Skip to main content
Glama

analyticsdata.properties.checkCompatibility

Check whether dimensions and metrics are compatible for a Google Analytics Core report before running it, preventing failed requests due to incompatible combinations.

Instructions

This compatibility method lists dimensions and metrics that can be added to a report request and maintain compatibility. This method fails if the request's dimensions and metrics are incompatible. In Google Analytics, reports fail if they request incompatible dimensions and/or metrics; in that case, you will need to remove dimensions and/or metrics from the incompatible report until the report is compatible. The Realtime and Core reports have different compatibility rules. This method checks compatibility for Core reports [HTTP POST] — creates or triggers a change; refused under --readonly safety profiles. Returns the API's response resource as JSON — request body is a JSON CheckCompatibilityRequest object accepting compatibilityFilter, dimensionFilter, dimensions, metricFilter, metrics; pass it via params or whole via body_file Siblings over the same resource: batchRunPivotReports, batchRunReports, getMetadata, runPivotReport, runRealtimeReport, runReport.

Input Schema

NameRequiredDescriptionDefault
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.
propertyYes[URL path segment] A Google Analytics property identifier whose events are tracked. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/dev
body_fileNoRead the request body from this file ('-' for stdin) instead of building one from the parameters. The body is a JSON CheckCompatibilityRequest object.
request_bodyNoRequest body of type CheckCompatibilityRequest: pass it via `params` (merged into the built body) or whole via `body_file`.

Output Schema

NameRequiredDescriptionDefault
metricCompatibilitiesNo
dimensionCompatibilitiesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / body_file / description
      Previous value: -"Read the request body from this file ('-' for stdin) instead of building one from the parameters."New value: +"Read the request body from this file ('-' for stdin) instead of building one from the parameters. The body is a JSON CheckCompatibilityRequest object."
    • addedInput schema / properties / request_body
      Added value: +{
      +  "description": "Request body of type CheckCompatibilityRequest: pass it via `params` (merged into the built body) or whole via `body_file`.",
      +  "properties": {
      +    "compatibilityFilter": {
      +      "enum": [
      +        "COMPATIBILITY_UNSPECIFIED",
      +        "COMPATIBLE",
      +        "INCOMPATIBLE"
      +      ],
      +      "type": "string"
      +    },
      +    "dimensionFilter": {
      +      "properties": {
      +        "andGroup": {
      +          "properties": {
      +            "expressions": {
      +              "items": {
      +                "properties": {
      +                  "andGroup": {
      +                    "type": "object"
      +                  },
      +                  "filter": {
      +                    "type": "object"
      +                  },
      +                  "notExpression": {
      +                    "type": "object"
      +                  },
      +                  "orGroup": {
      +                    "type": "object"
      +                  }
      +                },
      +                "type": "object"
      +              },
      +              "type": "array"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "filter": {
      +          "properties": {
      +            "betweenFilter": {
      +              "properties": {
      +                "fromValue": {
      +                  "type": "object"
      +                },
      +                "toValue": {
      +                  "type": "object"
      +                }
      +              },
      +              "type": "object"
      +            },
      +            "emptyFilter": {
      +              "type": "object"
      +            },
      +            "fieldName": {
      +              "type": "string"
      +            },
      +            "inListFilter": {
      +              "properties": {
      +                "caseSensitive": {
      +                  "type": "boolean"
      +                },
      +                "values": {
      +                  "items": {
      +                    "type": "string"
      +                  },
      +                  "type": "array"
      +                }
      +              },
      +              "type": "object"
      +            },
      +            "numericFilter": {
      +              "properties": {
      +                "operation": {
      +                  "enum": [
      +                    "OPERATION_UNSPECIFIED",
      +                    "EQUAL",
      +                    "LESS_THAN",
      +                    "LESS_THAN_OR_EQUAL",
      +                    "GREATER_THAN",
      +                    "GREATER_THAN_OR_EQUAL"
      +                  ],
      +                  "type": "string"
      +                },
      +                "value": {
      +                  "type": "object"
      +                }
      +              },
      +              "type": "object"
      +            },
      +            "stringFilter": {
      +              "properties": {
      +                "caseSensitive": {
      +                  "type": "boolean"
      +                },
      +                "matchType": {
      +                  "enum": [
      +                    "MATCH_TYPE_UNSPECIFIED",
      +                    "EXACT",
      +                    "BEGINS_WITH",
      +                    "ENDS_WITH",
      +                    "CONTAINS",
      +                    "FULL_REGEXP",
      +                    "PARTIAL_REGEXP"
      +                  ],
      +                  "type": "string"
      +                },
      +                "value": {
      +                  "type": "string"
      +                }
      +              },
      +              "type": "object"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "notExpression": {
      +          "properties": {
      +            "andGroup": {
      +              "properties": {
      +                "expressions": {
      +                  "items": {
      +                    "type": "object"
      +                  },
      +                  "type": "array"
      +                }
      +              },
      +              "type": "object"
      +            },
      +            "filter": {
      +              "properties": {
      +                "betweenFilter": {
      +                  "type": "object"
      +                },
      +                "emptyFilter": {
      +                  "type": "object"
      +                },
      +                "fieldName": {
      +                  "type": "string"
      +                },
      +                "inListFilter": {
      +                  "type": "object"
      +                },
      +                "numericFilter": {
      +                  "type": "object"
      +                },
      +                "stringFilter": {
      +                  "type": "object"
      +                }
      +              },
      +              "type": "object"
      +            },
      +            "notExpression": {
      +              "properties": {
      +                "andGroup": {
      +                  "type": "object"
      +                },
      +                "filter": {
      +                  "type": "object"
      +                },
      +                "notExpression": {
      +                  "type": "object"
      +                },
      +                "orGroup": {
      +                  "type": "object"
      +                }
      +              },
      +              "type": "object"
      +            },
      +            "orGroup": {
      +              "properties": {
      +                "expressions": {
      +                  "items": {
      +                    "type": "object"
      +                  },
      +                  "type": "array"
      +                }
      +              },
      +              "type": "object"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "orGroup": {
      +          "properties": {
      +            "expressions": {
      +              "items": {
      +                "properties": {
      +                  "andGroup": {
      +                    "type": "object"
      +                  },
      +                  "filter": {
      +                    "type": "object"
      +                  },
      +                  "notExpression": {
      +                    "type": "object"
      +                  },
      +                  "orGroup": {
      +                    "type": "object"
      +                  }
      +                },
      +                "type": "object"
      +              },
      +              "type": "array"
      +            }
      +          },
      +          "type": "object"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "dimensions": {
      +      "items": {
      +        "properties": {
      +          "dimensionExpression": {
      +            "properties": {
      +              "concatenate": {
      +                "properties": {
      +                  "delimiter": {
      +                    "type": "string"
      +                  },
      +                  "dimensionNames": {
      +                    "items": {
      +                      "type": "string"
      +                    },
      +                    "type": "array"
      +                  }
      +                },
      +                "type": "object"
      +              },
      +              "lowerCase": {
      +                "properties": {
      +                  "dimensionName": {
      +                    "type": "string"
      +                  }
      +                },
      +                "type": "object"
      +              },
      +              "upperCase": {
      +                "properties": {
      +                  "dimensionName": {
      +                    "type": "string"
      +                  }
      +                },
      +                "type": "object"
      +              }
      +            },
      +            "type": "object"
      +          },
      +          "name": {
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "metricFilter": {
      +      "properties": {
      +        "andGroup": {
      +          "properties": {
      +            "expressions": {
      +              "items": {
      +                "properties": {
      +                  "andGroup": {
      +                    "type": "object"
      +                  },
      +                  "filter": {
      +                    "type": "object"
      +                  },
      +                  "notExpression": {
      +                    "type": "object"
      +                  },
      +                  "orGroup": {
      +                    "type": "object"
      +                  }
      +                },
      +                "type": "object"
      +              },
      +              "type": "array"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "filter": {
      +          "properties": {
      +            "betweenFilter": {
      +              "properties": {
      +                "fromValue": {
      +                  "type": "object"
      +                },
      +                "toValue": {
      +                  "type": "object"
      +                }
      +              },
      +              "type": "object"
      +            },
      +            "emptyFilter": {
      +              "type": "object"
      +            },
      +            "fieldName": {
      +              "type": "string"
      +            },
      +            "inListFilter": {
      +              "properties": {
      +                "caseSensitive": {
      +                  "type": "boolean"
      +                },
      +                "values": {
      +                  "items": {
      +                    "type": "string"
      +                  },
      +                  "type": "array"
      +                }
      +              },
      +              "type": "object"
      +            },
      +            "numericFilter": {
      +              "properties": {
      +                "operation": {
      +                  "enum": [
      +                    "OPERATION_UNSPECIFIED",
      +                    "EQUAL",
      +                    "LESS_THAN",
      +                    "LESS_THAN_OR_EQUAL",
      +                    "GREATER_THAN",
      +                    "GREATER_THAN_OR_EQUAL"
      +                  ],
      +                  "type": "string"
      +                },
      +                "value": {
      +                  "type": "object"
      +                }
      +              },
      +              "type": "object"
      +            },
      +            "stringFilter": {
      +              "properties": {
      +                "caseSensitive": {
      +                  "type": "boolean"
      +                },
      +                "matchType": {
      +                  "enum": [
      +                    "MATCH_TYPE_UNSPECIFIED",
      +                    "EXACT",
      +                    "BEGINS_WITH",
      +                    "ENDS_WITH",
      +                    "CONTAINS",
      +                    "FULL_REGEXP",
      +                    "PARTIAL_REGEXP"
      +                  ],
      +                  "type": "string"
      +                },
      +                "value": {
      +                  "type": "string"
      +                }
      +              },
      +              "type": "object"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "notExpression": {
      +          "properties": {
      +            "andGroup": {
      +              "properties": {
      +                "expressions": {
      +                  "items": {
      +                    "type": "object"
      +                  },
      +                  "type": "array"
      +                }
      +              },
      +              "type": "object"
      +            },
      +            "filter": {
      +              "properties": {
      +                "betweenFilter": {
      +                  "type": "object"
      +                },
      +                "emptyFilter": {
      +                  "type": "object"
      +                },
      +                "fieldName": {
      +                  "type": "string"
      +                },
      +                "inListFilter": {
      +                  "type": "object"
      +                },
      +                "numericFilter": {
      +                  "type": "object"
      +                },
      +                "stringFilter": {
      +                  "type": "object"
      +                }
      +              },
      +              "type": "object"
      +            },
      +            "notExpression": {
      +              "properties": {
      +                "andGroup": {
      +                  "type": "object"
      +                },
      +                "filter": {
      +                  "type": "object"
      +                },
      +                "notExpression": {
      +                  "type": "object"
      +                },
      +                "orGroup": {
      +                  "type": "object"
      +                }
      +              },
      +              "type": "object"
      +            },
      +            "orGroup": {
      +              "properties": {
      +                "expressions": {
      +                  "items": {
      +                    "type": "object"
      +                  },
      +                  "type": "array"
      +                }
      +              },
      +              "type": "object"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "orGroup": {
      +          "properties": {
      +            "expressions": {
      +              "items": {
      +                "properties": {
      +                  "andGroup": {
      +                    "type": "object"
      +                  },
      +                  "filter": {
      +                    "type": "object"
      +                  },
      +                  "notExpression": {
      +                    "type": "object"
      +                  },
      +                  "orGroup": {
      +                    "type": "object"
      +                  }
      +                },
      +                "type": "object"
      +              },
      +              "type": "array"
      +            }
      +          },
      +          "type": "object"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "metrics": {
      +      "items": {
      +        "properties": {
      +          "expression": {
      +            "type": "string"
      +          },
      +          "invisible": {
      +            "type": "boolean"
      +          },
      +          "name": {
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "type": "object"
      +}
  2. Changed3 schema fields changed
    • changedInput schema / properties / property / description
      Previous value: -"A Google Analytics property identifier whose events are tracked. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/dev"New value: +"[URL path segment] A Google Analytics property identifier whose events are tracked. To learn more, see [where to find your Property ID](https://developers.google.com/analytics/dev"
    • addedInput schema / properties / property / pattern
      Added value: +"^properties/[^/]+$"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "dimensionCompatibilities": {
      +      "items": {
      +        "properties": {
      +          "compatibility": {
      +            "enum": [
      +              "COMPATIBILITY_UNSPECIFIED",
      +              "COMPATIBLE",
      +              "INCOMPATIBLE"
      +            ],
      +            "type": "string"
      +          },
      +          "dimensionMetadata": {
      +            "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": "object"
      +      },
      +      "type": "array"
      +    },
      +    "metricCompatibilities": {
      +      "items": {
      +        "properties": {
      +          "compatibility": {
      +            "enum": [
      +              "COMPATIBILITY_UNSPECIFIED",
      +              "COMPATIBLE",
      +              "INCOMPATIBLE"
      +            ],
      +            "type": "string"
      +          },
      +          "metricMetadata": {
      +            "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": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "type": "object"
      +}
  3. First observed

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the burden and discloses important behavior: it is an HTTP POST, may be refused under readonly safety profiles, fails when dimensions/metrics are incompatible, and returns JSON. The phrase 'creates or triggers a change' is somewhat ambiguous for a compatibility-check method, but the safety-profile and failure behavior are clearly surfaced.

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?

The purpose is front-loaded and the extra details about Core vs Realtime rules and POST safety are relevant. Some explanation is redundant, but the paragraph remains efficiently organized for a complex Analytics API method.

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?

Given the nested request body and available output schema, the description provides enough context to call the tool correctly: it identifies the endpoint's purpose, compatibility failure behavior, Core-report scope, and request-body mechanism. Authentication and rate-limit details are omitted, but those are not essential to invoke this specific method.

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 the parameters in detail. The description names the CheckCompatibilityRequest fields and explains that the body can be passed via params or body_file, but this largely restates what the schema already provides rather than adding new semantics.

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?

The description states a specific verb and resource: it lists compatible dimensions and metrics for a Core report request. It also distinguishes this method from Realtime compatibility checks and names sibling report methods, so an agent can identify its role without opening other tools.

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?

It explains that this checks Core-report compatibility and that Realtime reports use different rules, which effectively scopes when to use it. It does not explicitly say to call it before runReport instead of after a failure, but the intended usage context is clear.

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