Skip to main content
Glama
leonardosepulvedat

MCP Google Analytics Server

ga_validate_event

Read-onlyIdempotent

Validate events against GA4's debug endpoint before sending, catching errors in parameters and event names without recording test data. Get validation messages to fix issues early.

Instructions

Validate an event before sending it to Google Analytics.

Uses GA4's debug endpoint to check for errors without recording the event. Returns validation messages and errors if any.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
eventsYes
user_idNo
client_idNo
user_propertiesNoUser properties (e.g., {subscription_tier: {value: "premium"}})

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed8 schema fields changedv1.1.1
    • addedInput schema / $schema
      Added value: +"http://json-schema.org/draft-07/schema#"
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / events / items / additionalProperties
      Added value: +false
    • addedInput schema / properties / events / items / properties / name / description
      Added value: +"Event name (e.g., \"purchase\", \"sign_up\")"
    • changedInput schema / properties / events / items / properties / params / additionalProperties
      Previous value: -trueNew value: +{}
    • addedInput schema / properties / events / items / properties / params / description
      Added value: +"Event parameters (key-value pairs)"
    • changedInput schema / properties / user_properties / additionalProperties
      Previous value: -trueNew value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "value": {
      +      "type": [
      +        "string",
      +        "number"
      +      ]
      +    }
      +  },
      +  "required": [
      +    "value"
      +  ],
      +  "type": "object"
      +}
    • addedInput schema / properties / user_properties / description
      Added value: +"User properties (e.g., {subscription_tier: {value: \"premium\"}})"
  2. First observedv1.0.1

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover read-only/idempotent/non-destructive behavior. The description adds valuable behavioral detail: it uses the debug endpoint, does not record the event, and returns validation messages/errors. No contradiction with annotations.

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?

Three concise sentences, front-loaded with the primary purpose, followed by mechanism and return value. Every sentence earns its place.

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 validation tool with strong annotations and a nested input schema, the description covers purpose, non-destructive behavior, and return value. Some parameter semantics are thin, but the schema plus standard GA field names make the tool callable. An output schema would have helped, but the description states the return enough for selection.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With only 25% schema description coverage, the description needed to compensate, but it adds no information about user_id, client_id, user_properties, or the structure of the events array beyond generic 'event.' The schema supplies some details, but the description doesn't bridge the gap.

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: 'Validate an event before sending it to Google Analytics.' It also names the mechanism (GA4 debug endpoint) and explicitly distinguishes itself from send tools by noting it checks without recording the event.

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 clear context: use before sending an event to verify errors without recording it. It doesn't explicitly name alternatives such as ga_send_event or state when not to use it, so it stops short of a 5.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/leonardosepulvedat/mcp-google-analytics'

If you have feedback or need assistance with the MCP directory API, please join our Discord server