get_team_event_matches_simple
Retrieve simplified match data for a specific FIRST Robotics Competition team at a particular event using The Blue Alliance API.
Instructions
Get simplified matches for 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:865-883 (handler)Executes the tool by validating inputs with Zod, fetching simplified match data for a team at a specific event from the TBA API, parsing the response, and returning it as formatted JSON.case 'get_team_event_matches_simple': { 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}/matches/simple`, ); const matches = z.array(MatchSimpleSchema).parse(data); return { content: [ { type: 'text', text: JSON.stringify(matches, null, 2), }, ], };
- src/tools.ts:875-893 (registration)Registers the tool in the MCP tools list with name, description, and input schema definition.{ name: 'get_team_event_matches_simple', description: 'Get simplified matches for 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:392-412 (schema)Zod schema definition for validating the simplified match objects returned by the TBA API.export const MatchSimpleSchema = z.object({ key: z.string(), comp_level: z.string(), set_number: z.number(), match_number: z.number(), alliances: z.object({ red: z.object({ score: z.number(), team_keys: z.array(z.string()), }), blue: z.object({ score: z.number(), team_keys: z.array(z.string()), }), }), winning_alliance: z.string().nullish(), event_key: z.string(), time: z.number().nullish(), predicted_time: z.number().nullish(), actual_time: z.number().nullish(), });
- src/schemas.ts:4-6 (schema)Zod schema for validating team keys used in input.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 keys used in input.export const EventKeySchema = z.string();