Event Names
rybbit_get_event_namesRetrieve custom event names and occurrence counts for a Rybbit Analytics site to identify tracked events within specified date ranges and filters.
Instructions
Get all custom event names and their occurrence counts for a site. Useful for discovering what events are being tracked.
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) |
Implementation Reference
- src/tools/events.ts:60-86 (handler)The handler and registration logic for the 'rybbit_get_event_names' tool.
server.registerTool( "rybbit_get_event_names", { title: "Event Names", annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true, destructiveHint: false }, description: "Get all custom event names and their occurrence counts for a site. Useful for discovering what events are being tracked.", inputSchema: { ...analyticsInputSchema, }, }, async (args) => { try { const params = client.buildAnalyticsParams(args); const data = await client.get(`/sites/${args.siteId}/events/names`, 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, }; } } );