get_district_events_keys
Retrieve event keys for a specific FIRST Robotics Competition district to access competition data and schedules.
Instructions
Get event keys in a specific district
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| district_key | Yes | District key (e.g., 2023fim) |
Implementation Reference
- src/handlers.ts:941-957 (handler)The main handler logic for the 'get_district_events_keys' tool. It validates the district_key input using Zod, makes an API request to The Blue Alliance for the district's event keys, parses the response as an array of strings, and returns the JSON-formatted result.case 'get_district_events_keys': { const { district_key } = z .object({ district_key: z.string() }) .parse(args); const data = await makeApiRequest( `/district/${district_key}/events/keys`, ); const keys = z.array(z.string()).parse(data); return { content: [ { type: 'text', text: JSON.stringify(keys, null, 2), }, ], }; }
- src/tools.ts:941-954 (registration)The tool registration object defining the name, description, and input schema. This is part of the tools array exported and used by the MCP server to list available tools.{ name: 'get_district_events_keys', description: 'Get event keys in a specific district', inputSchema: { type: 'object', properties: { district_key: { type: 'string', description: 'District key (e.g., 2023fim)', }, }, required: ['district_key'], }, },
- src/handlers.ts:948-956 (schema)Output schema validation using Zod to parse the API response as an array of strings.const keys = z.array(z.string()).parse(data); return { content: [ { type: 'text', text: JSON.stringify(keys, null, 2), }, ], };