Event Time Series
rybbit_get_event_timeseriesRetrieve event counts as time-series data with configurable time buckets to analyze trends over specific periods for a website.
Instructions
Get custom event counts as time-series data with configurable buckets. Useful for analyzing event trends over time.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| siteId | Yes | Site ID (numeric ID or domain identifier) | |
| startDate | No | Start date in ISO format (YYYY-MM-DD) | |
| endDate | No | End date in ISO format (YYYY-MM-DD) | |
| timeZone | No | IANA timezone (e.g., Europe/Prague). Default: UTC | |
| filters | No | Array of filters. Example: [{parameter:'browser',type:'equals',value:['Chrome']},{parameter:'country',type:'equals',value:['US','DE']}] | |
| pastMinutesStart | No | Alternative to dates: minutes ago start (e.g., 60 = last hour) | |
| pastMinutesEnd | No | Alternative to dates: minutes ago end (default 0 = now) | |
| bucket | No | Time bucket granularity (default: day). Use 'hour' for last 24h, 'week'/'month' for long ranges |
Implementation Reference
- src/tools/events.ts:118-145 (handler)The registration and handler logic for the rybbit_get_event_timeseries tool.
server.registerTool( "rybbit_get_event_timeseries", { title: "Event Time Series", annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true, destructiveHint: false }, description: "Get custom event counts as time-series data with configurable buckets. Useful for analyzing event trends over time.", inputSchema: { ...analyticsInputSchema, bucket: bucketSchema, }, }, async (args) => { try { const params = client.buildAnalyticsParams(args); const data = await client.get(`/sites/${args.siteId}/events/bucketed`, params); return { content: [{ type: "text" as const, text: truncateResponse(data) }], }; } catch (err) { const message = err instanceof Error ? err.message : String(err); return { content: [{ type: "text" as const, text: `Error: ${message}` }], isError: true, }; } } );