get_event
Retrieve detailed information about FIRST Robotics Competition events using event keys to access comprehensive data through The Blue Alliance API.
Instructions
Get detailed information about a specific event
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| event_key | Yes | Event key (e.g., 2023casj) |
Implementation Reference
- src/handlers.ts:123-134 (handler)The core handler logic for the 'get_event' tool within a switch statement on tool name. It parses the event_key argument using Zod, makes an API request to TBA for the event data, validates the response with EventSchema, and returns a text content block with the JSON-stringified event object.case 'get_event': { const { event_key } = z.object({ event_key: EventKeySchema }).parse(args); const data = await makeApiRequest(`/event/${event_key}`); const event = EventSchema.parse(data); return { content: [ { type: 'text', text: JSON.stringify(event, null, 2), }, ], };
- src/tools.ts:98-110 (registration)The MCP tool registration definition for 'get_event' in the exported tools array, specifying the tool name, description, and input schema for event_key.{ name: 'get_event', description: 'Get detailed information about a specific event', inputSchema: { type: 'object', properties: { event_key: { type: 'string', description: 'Event key (e.g., 2023casj)', }, }, required: ['event_key'], },
- src/schemas.ts:8-8 (schema)Zod schema used in the handler for input validation of the event_key parameter.export const EventKeySchema = z.string();
- src/schemas.ts:38-85 (schema)Comprehensive Zod schema for validating the structure of event data returned from the TBA API, used in the handler to parse the API response.export const EventSchema = z.object({ key: z.string(), name: z.string(), event_code: z.string(), event_type: z.number(), district: z .object({ abbreviation: z.string(), display_name: z.string(), key: z.string(), year: z.number(), }) .nullish(), city: z.string().nullish(), state_prov: z.string().nullish(), country: z.string().nullish(), start_date: z.string(), end_date: z.string(), year: z.number(), short_name: z.string().nullish(), event_type_string: z.string(), week: z.number().nullish(), address: z.string().nullish(), postal_code: z.string().nullish(), gmaps_place_id: z.string().nullish(), gmaps_url: z.string().nullish(), lat: z.number().nullish(), lng: z.number().nullish(), location_name: z.string().nullish(), timezone: z.string().nullish(), website: z.string().nullish(), first_event_id: z.string().nullish(), first_event_code: z.string().nullish(), webcasts: z .array( z.object({ type: z.string(), channel: z.string(), date: z.string().nullish(), file: z.string().nullish(), }), ) .nullish(), division_keys: z.array(z.string()).nullish(), parent_event_key: z.string().nullish(), playoff_type: z.number().nullish(), playoff_type_string: z.string().nullish(), });