get_event_insights
Retrieve event-specific insights and statistics from FIRST Robotics Competition data to analyze performance and trends.
Instructions
Get event-specific insights and statistics
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| event_key | Yes | Event key (e.g., 2023casj) |
Implementation Reference
- src/handlers.ts:193-205 (handler)Handler function for 'get_event_insights' tool: parses event_key, fetches insights from TBA API `/event/{event_key}/insights`, validates with InsightsSchema, returns JSON stringified response.case 'get_event_insights': { const { event_key } = z.object({ event_key: EventKeySchema }).parse(args); const data = await makeApiRequest(`/event/${event_key}/insights`); const insights = InsightsSchema.parse(data); return { content: [ { type: 'text', text: JSON.stringify(insights, null, 2), }, ], }; }
- src/tools.ts:168-181 (schema)Input schema definition for the 'get_event_insights' tool, specifying required event_key parameter.{ name: 'get_event_insights', description: 'Get event-specific insights and statistics', inputSchema: { type: 'object', properties: { event_key: { type: 'string', description: 'Event key (e.g., 2023casj)', }, }, required: ['event_key'], }, },
- src/schemas.ts:228-231 (schema)Zod schema for validating the output from TBA event insights API endpoint.export const InsightsSchema = z.object({ qual: z.record(z.string(), z.any()).nullish(), playoff: z.record(z.string(), z.any()).nullish(), });
- src/index.ts:45-47 (registration)Registration of all tools (including get_event_insights) via the tools array exported from tools.ts for MCP ListTools request.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; });