get_team_event_matches_keys
Retrieve match keys for a specific team at a FIRST Robotics Competition event using The Blue Alliance API. Input team and event keys to access match data.
Instructions
Get match keys 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:886-905 (handler)The core handler logic for the 'get_team_event_matches_keys' tool. Validates inputs using Zod schemas (TeamKeySchema and EventKeySchema), makes an API request to The Blue Alliance (TBA) for match keys at a specific team-event combination, parses the response as an array of strings, and returns the JSON-formatted list.case 'get_team_event_matches_keys': { 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/keys`, ); const keys = z.array(z.string()).parse(data); return { content: [ { type: 'text', text: JSON.stringify(keys, null, 2), }, ], }; }
- src/tools.ts:894-912 (registration)Tool registration in the exported tools array, including name, description, and JSON input schema for MCP tool discovery and validation.{ name: 'get_team_event_matches_keys', description: 'Get match keys 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:4-6 (schema)Zod schema used in the handler for strict runtime validation of the team_key parameter.export const TeamKeySchema = z .string() .regex(/^frc\d+$/, 'Team key must be in format frcXXXX');
- src/schemas.ts:8-8 (schema)Zod schema used in the handler for runtime validation of the event_key parameter.export const EventKeySchema = z.string();