get_team_event_awards
Retrieve awards earned by a specific FRC team at a particular FIRST Robotics Competition event. Use this tool to access team achievement data from The Blue Alliance database.
Instructions
Get awards won by a team at a specific event
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| team_key | Yes | Team key in format frcXXXX (e.g., frc86) | |
| event_key | Yes | Event key (e.g., 2023casj) |
Implementation Reference
- src/handlers.ts:654-673 (handler)Executes the tool logic: validates team_key and event_key inputs using Zod schemas, makes API request to TBA /team/{team_key}/event/{event_key}/awards, parses awards array, returns JSON stringified response.case 'get_team_event_awards': { const { team_key, event_key } = z .object({ team_key: TeamKeySchema, event_key: EventKeySchema, }) .parse(args); const data = await makeApiRequest( `/team/${team_key}/event/${event_key}/awards`, ); const awards = z.array(AwardSchema).parse(data); return { content: [ { type: 'text', text: JSON.stringify(awards, null, 2), }, ], }; }
- src/tools.ts:635-653 (registration)Registers the MCP tool with name, description, and input schema matching the handler's expected arguments.{ name: 'get_team_event_awards', description: 'Get awards won by a team at a specific event', inputSchema: { type: 'object', properties: { team_key: { type: 'string', description: 'Team key in format frcXXXX (e.g., frc86)', pattern: '^frc\\d+$', }, event_key: { type: 'string', description: 'Event key (e.g., 2023casj)', }, }, required: ['team_key', 'event_key'], }, },
- src/schemas.ts:123-134 (schema)Zod schema used to parse the array of awards returned from the TBA API in the handler.export const AwardSchema = z.object({ name: z.string(), award_type: z.number(), event_key: z.string(), recipient_list: z.array( z.object({ team_key: z.string().nullish(), awardee: z.string().nullish(), }), ), year: z.number(), });
- src/schemas.ts:4-6 (schema)Zod schema for validating team_key input parameter.export const TeamKeySchema = z .string() .regex(/^frc\d+$/, 'Team key must be in format frcXXXX');
- src/schemas.ts:8-8 (schema)Zod schema for validating event_key input parameter.export const EventKeySchema = z.string();