Skip to main content
Glama
nks-hub

rybbit-mcp

by nks-hub

Event Aggregate

rybbit_get_event_aggregate
Read-onlyIdempotent

Group and count analytics events by dimensions like user, path, or custom properties; filter by event name or properties to analyze trends and sessions.

Instructions

Aggregate events by one or more dimensions (e.g. identified_user_id, traits.username, pathname, properties.room_id). Filters by event_name and optional property filters, then groups remaining events. Returns { groups: [{key, count, first_seen, last_seen, sessions, extras}], scanned, hitCount, hasMore }. When hasMore: true, the scan was capped — narrow the time window or raise maxScan for more accuracy.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topNNoReturn only the top N groups by count (default 50).
siteIdYesSite ID (numeric ID or domain identifier)
endDateNoEnd date in ISO format (YYYY-MM-DD)
filtersNoArray of filters. Example: [{parameter:'browser',type:'equals',value:['Chrome']},{parameter:'country',type:'equals',value:['US','DE']}]
groupByYesOne or more group keys. Built-in: 'identified_user_id', 'user_id', 'pathname', 'hostname', 'country', 'browser', 'device_type', 'traits.username', 'traits.sex'. Use 'properties.<name>' to group by an event property (e.g. 'properties.room_id').
maxScanNoMaximum events to scan from the backend (default 5000).
timeZoneNoIANA timezone (e.g., Europe/Prague). Default: UTC
eventNameNoOptional exact event_name to filter for (e.g., 'pm_sent').
startDateNoStart date in ISO format (YYYY-MM-DD)
pastMinutesEndNoAlternative to dates: minutes ago end (default 0 = now)
propertyFiltersNoFilters applied to parsed event properties after fetch.
pastMinutesStartNoAlternative to dates: minutes ago start (e.g., 60 = last hour)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
groupsYesGrouped event counts, sorted by count DESC by default
hasMoreYesTrue if scan was capped by maxScan and more data exists
scannedYesTotal events scanned across pagination
hitCountYesEvents matching eventName / property filters
windowEndNo
windowStartNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.8.1

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive). The description adds genuinely useful non-annotation behavior: the scan is capped and `hasMore: true` signals an incomplete result, with the remedy (narrow window or raise maxScan). That is exactly the kind of caveat an agent needs before trusting counts.

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 sentences, front-loaded with the operation then the filtering/grouping order, then the output contract and its caveat. The embedded return-shape JSON is somewhat lengthy and partly redundant with the output schema, but it is compact and the hasMore caveat justifies its presence.

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 12-parameter analytics tool with a full output schema and read-only annotations, the description covers operation, filter order, and the result-truncation caveat. Since an output schema exists, restating the return shape is optional rather than required, so this is complete without being maximal.

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?

Schema description coverage is 100%, so a 3 is the baseline. The description earns above baseline by explaining the maxScan/hasMore interaction, which the per-parameter docs do not state, and by illustrating groupBy dimension syntax (properties.<name>) in context.

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 (aggregate) plus resource (events) and the mechanism (groupBy dimensions, event_name filter), which is precise enough to distinguish it from get_metric or get_event_timeseries. It stops short of naming the sibling tools it should be chosen over, so it lands just below the top band.

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 implied by the grouping/filtering description and the hasMore guidance gives a corrective action, but there is no explicit statement of when to choose this over sibling aggregates like rybbit_get_metric, rybbit_get_event_timeseries, or rybbit_get_event_properties. Adequate but leaves routing to inference.

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