get_event_data_stats
Retrieve summary statistics for website event data within specified timeframes, enabling analysis of user interactions and behavior patterns.
Instructions
Get event data statistics (summary counts) for a website
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| websiteId | Yes | Website UUID | |
| startAt | Yes | Start timestamp in milliseconds | |
| endAt | Yes | End timestamp in milliseconds | |
| eventName | No | Filter by event name |
Implementation Reference
- src/tools/events.ts:122-140 (handler)Implementation and registration of the 'get_event_data_stats' MCP tool.
server.tool( "get_event_data_stats", "Get event data statistics (summary counts) for a website", { websiteId: z.string().describe("Website UUID"), startAt: z.number().describe("Start timestamp in milliseconds"), endAt: z.number().describe("End timestamp in milliseconds"), eventName: z.string().optional().describe("Filter by event name"), }, async ({ websiteId, startAt, endAt, eventName }) => { const data = await client.call( "GET", `/api/websites/${websiteId}/event-data/stats`, undefined, { startAt, endAt, eventName } ); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; } );