Skip to main content
Glama
rybbit-mcp

rybbit-mcp

by nks-hub

Event Aggregate

rybbit_get_event_aggregate
Read-onlyIdempotent

Aggregate analytics events by one or more dimensions, filter by event name or properties, and return grouped counts with first/last seen and session totals.

Instructions

Aggregate events by one or more dimensions (e.g. identified_user_id, traits.username, pathname, properties.plan). 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 stopped at maxScan before the start of the range: narrow the time window or raise maxScan. Events are read in pages of 1000, roughly 0.5 s each: the default maxScan of 5000 takes about 3 s, 50000 about 20 s.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "siteId": "<siteId>",
      "groupBy": "<groupBy>"
    },
    "name": "rybbit_get_event_aggregate"
  }
}

Input 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.plan'. Use 'properties.<name>' to group by an event property (e.g. 'properties.plan').
maxScanNoMaximum events to read, newest first (default 5000).
timeZoneNoIANA timezone (e.g., Europe/Prague). Default: UTC
eventNameNoOptional exact event_name to filter for (e.g., 'signup').
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

NameRequiredDescriptionDefault
noteNoCaveat about this response, e.g. how many rows were returned and how to get the rest
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
truncatedNoTrue when rows were dropped to keep the response under the size cap
windowEndNo
windowStartNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.9.1
    • removedInput schema / additionalProperties
      Removed value: -false
    • removedInput schema / properties / filters / items / additionalProperties
      Removed value: -false
    • removedInput schema / properties / propertyFilters / items / additionalProperties
      Removed value: -false
    • changedOutput schema / additionalProperties
      Previous value: -trueNew value: +{}
    • changedOutput schema / properties / groups / items / additionalProperties
      Previous value: -trueNew value: +{}
    • addedOutput schema / properties / groups / items / properties / extras / propertyNames
      Added value: +{
      +  "type": "string"
      +}
  2. Changed7 schema fields changedv0.9.0
    • changedInput schema / properties / eventName / description
      Previous value: -"Optional exact event_name to filter for (e.g., 'pm_sent')."New value: +"Optional exact event_name to filter for (e.g., 'signup')."
    • changedInput schema / properties / filters / items / properties / parameter / description
      Previous value: -"Filter dimension. One of: browser, browser_version, operating_system, operating_system_version, language, country, region, city, device_type, device_model, app_version, dimensions, referrer, hostname, pathname, page_title, querystring, event_name, channel, utm_source, utm_medium, utm_campaign, utm_term, utm_content, entry_page, exit_page, user_id, lat, lon, timezone, tag. Custom URL parameters use the prefix 'url_param:NAME' (e.g., 'url_param:campaign_id'). Note: user_id filter checks BOTH the device hash (user_id) and app-provided ID (identified_user_id). device_model and app_version are populated only for mobile-type sites (legacy: app) tracked via SDK."New value: +"Filter dimension, e.g. browser, country, pathname, device_type, referrer, event_name (all of them are listed by rybbit_describe_dimension). Custom URL parameters use the prefix 'url_param:NAME'."
    • changedInput schema / properties / groupBy / description
      Previous value: -"One 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')."New value: +"One or more group keys. Built-in: 'identified_user_id', 'user_id', 'pathname', 'hostname', 'country', 'browser', 'device_type', 'traits.username', 'traits.plan'. Use 'properties.<name>' to group by an event property (e.g. 'properties.plan')."
    • changedInput schema / properties / maxScan / description
      Previous value: -"Maximum events to scan from the backend (default 5000)."New value: +"Maximum events to read, newest first (default 5000)."
    • changedOutput schema / additionalProperties
      Previous value: -falseNew value: +true
    • addedOutput schema / properties / note
      Added value: +{
      +  "description": "Caveat about this response, e.g. how many rows were returned and how to get the rest",
      +  "type": "string"
      +}
    • addedOutput schema / properties / truncated
      Added value: +{
      +  "description": "True when rows were dropped to keep the response under the size cap",
      +  "type": "boolean"
      +}
  3. Addedv0.8.1

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, and non-destructive, so the safety profile is covered. The description goes well beyond that, disclosing the paged scan model (1000 events per page, ~0.5 s each), concrete latency figures for typical maxScan values, and the exact meaning of hasMore truncation plus the remedy (narrow the window or raise maxScan).

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?

Front-loaded with purpose and return shape, then truncation guidance, then performance notes — a sensible ordering with no filler sentences. It is dense, packing four distinct topics into one paragraph, but every sentence carries operational information.

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 aggregation tool with an output schema, the description covers the main failure mode (truncated scans) and the dominant grouping keys. Minor gaps remain around the startDate/pastMinutesStart alternation and how topN interacts with hasMore, but nothing critical for correct invocation is missing.

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 coverage is 100%, so baseline is 3; the description still adds value by tying maxScan to observable cost and to the hasMore signal, which is the parameter's real tradeoff. It also reinforces the groupBy key namespace and the event_name scoping, though date vs pastMinutes alternation is left entirely to the schema.

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 ('Aggregate events by one or more dimensions') and enumerates concrete group keys such as 'traits.username', 'pathname', and 'properties.plan', which distinguishes it from timeseries and leaderboard siblings. The return shape is named inline, so an agent knows exactly what kind of result to expect.

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 through the described workflow (filter by event_name and property filters, then group), and there is useful recovery guidance for the hasMore case. However, it never names an alternative sibling or states when to prefer this aggregation tool over rybbit_get_event_timeseries, rybbit_get_metric, or rybbit_get_event_user_leaderboard.

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