Skip to main content
Glama

ga4_top_events

Ranks GA4 events by frequency for a date range, showing event count, unique users, and events per user; optionally filter by event prefix.

Instructions

Most frequent events in a period, with event count, unique users and events per user. Optionally only events starting with a prefix. Requires: Google Analytics Data API (analyticsdata.googleapis.com) enabled on the quota project; Lector (Viewer) en la propiedad de GA4. If it fails for access, the error explains how to fix it; ga4_check_access checks everything at once.

Input Schema

NameRequiredDescriptionDefault
limitNo
prefixNoOnly events starting with this, e.g. "Payment_"
end_dateYesEnd date: YYYY-MM-DD, or relative like "today"
propertyNoSaved property name (see ga4_list_properties). Defaults to the default property.
start_dateYesStart date: YYYY-MM-DD, or relative like "7daysAgo", "yesterday", "today"

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.1.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the required API enablement, the permission level, and that access failures return a self-explanatory error, plus a pre-flight alternative. It does not mention quota consumption or that this is strictly a read-only query, so it is strong rather than complete.

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?

Three front-loaded sentences: output first, optional filter second, prerequisites and failure handling last. Efficient overall, though the mixed-language phrase 'Lector (Viewer) en la propiedad de GA4' is slightly awkward and could be tightened to a single English permission statement.

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 five-parameter read-only reporting tool with no output schema, the description covers what is returned, the optional filter, the auth/API prerequisites, and the recovery path via ga4_check_access. An agent has everything needed to call it or diagnose failure without opening the schema.

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 coverage is 80%, so the schema already documents prefix, dates and property. The description only restates the prefix filter in prose and adds nothing about limit semantics (default 50, max 1000) or how relative dates interact with the range. Baseline 3 applies where the schema does the heavy lifting.

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?

The description states a specific operation and resource: the most frequent events in a period, plus the exact metrics returned (event count, unique users, events per user) and an optional prefix filter. It is clear what the tool produces, though it does not name a sibling (e.g. ga4_event_counts or ga4_run_report) that an agent might confuse it with.

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?

It gives real prerequisites (Data API enabled on the quota project, Viewer access on the GA4 property) and routes the agent to ga4_check_access when access is in doubt, which is genuine usage guidance. However, it never says when to choose this over the many sibling reporting tools (ga4_event_counts, ga4_run_report, ga4_realtime_report) or when not to use it.

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