get_team_matches_keys
Retrieve match keys for a specific FRC team in a given competition year to access detailed match data and analyze team performance.
Instructions
Get match keys for a team in a specific year
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| team_key | Yes | Team key in format frcXXXX (e.g., frc86) | |
| year | Yes | Competition year |
Implementation Reference
- src/handlers.ts:696-715 (handler)Executes the get_team_matches_keys tool: validates team_key and year inputs using Zod, fetches match keys from TBA API /team/{team_key}/matches/{year}/keys, parses response as string array, returns formatted JSON.case 'get_team_matches_keys': { const { team_key, year } = z .object({ team_key: TeamKeySchema, year: YearSchema, }) .parse(args); const data = await makeApiRequest( `/team/${team_key}/matches/${year}/keys`, ); const keys = z.array(z.string()).parse(data); return { content: [ { type: 'text', text: JSON.stringify(keys, null, 2), }, ], }; }
- src/tools.ts:675-695 (registration)Registers the get_team_matches_keys tool in the tools array with name, description, and input schema definition for MCP.{ name: 'get_team_matches_keys', description: 'Get match keys for a team in a specific year', inputSchema: { type: 'object', properties: { team_key: { type: 'string', description: 'Team key in format frcXXXX (e.g., frc86)', pattern: '^frc\\d+$', }, year: { type: 'number', description: 'Competition year', minimum: 1992, maximum: new Date().getFullYear() + 1, }, }, required: ['team_key', 'year'], }, },
- src/schemas.ts:4-14 (schema)Zod input validation schemas for team_key (TeamKeySchema) and year (YearSchema) used in the handler's argument parsing.export const TeamKeySchema = z .string() .regex(/^frc\d+$/, 'Team key must be in format frcXXXX'); export const EventKeySchema = z.string(); export const YearSchema = z .number() .int() .min(1992) .max(new Date().getFullYear() + 1);