get_events_keys
Retrieve event keys for a specific FIRST Robotics Competition year to access detailed event data through The Blue Alliance API.
Instructions
Get list of event keys for a year
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| year | Yes | Competition year |
Implementation Reference
- src/handlers.ts:584-596 (handler)The core handler for the 'get_events_keys' tool. Validates the 'year' input using YearSchema, fetches event keys from TBA API endpoint `/events/${year}/keys`, parses response as array of strings, and returns formatted JSON response.case 'get_events_keys': { const { year } = z.object({ year: YearSchema }).parse(args); const data = await makeApiRequest(`/events/${year}/keys`); const keys = z.array(z.string()).parse(data); return { content: [ { type: 'text', text: JSON.stringify(keys, null, 2), }, ], }; }
- src/tools.ts:563-578 (registration)Registers the 'get_events_keys' tool in the tools array exported for MCP server list tools handler, including description and input schema matching YearSchema constraints.{ name: 'get_events_keys', description: 'Get list of event keys for a year', inputSchema: { type: 'object', properties: { year: { type: 'number', description: 'Competition year', minimum: 1992, maximum: new Date().getFullYear() + 1, }, }, required: ['year'], }, },
- src/schemas.ts:10-14 (schema)YearSchema Zod schema used for runtime input validation of the 'year' parameter in the get_events_keys handler.export const YearSchema = z .number() .int() .min(1992) .max(new Date().getFullYear() + 1);