get_event_rankings
Retrieve qualification rankings for an FRC event using its event key. Returns ordered team rows with records, scores, and sort criteria to assess performance and seed alliances.
Instructions
Retrieve the live or final qualification rankings for an FRC event. Returns ordered ranking rows (team key, rank, win/loss/tie record, matches played, qualification average, sort orders, extra stats, DQ count) plus metadata describing each sort criterion (e.g., Ranking Points, Auto, Endgame). Used to determine alliance selection order, seed playoff alliances, and assess team performance during qualification matches.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| event_key | Yes | TBA event key combining the season year and event code (e.g., '2023casj' for the 2023 Silicon Valley Regional, '2024txhou' for the 2024 Houston Championship, '2024micmp4' for a Michigan State Championship division). Use get_events or get_events_keys to discover valid event keys for a year. |
Implementation Reference
- src/handlers.ts:151-163 (handler)The handler function that executes the get_event_rankings tool logic. It parses the event_key from args, makes an API request to /event/{event_key}/rankings, validates the response with RankingSchema, and returns the rankings data as JSON.
case 'get_event_rankings': { const { event_key } = z.object({ event_key: EventKeySchema }).parse(args); const data = await makeApiRequest(`/event/${event_key}/rankings`); const rankings = RankingSchema.parse(data); return { content: [ { type: 'text', text: JSON.stringify(rankings, null, 2), }, ], }; } - src/schemas.ts:172-207 (schema)RankingSchema - Zod validation schema for the rankings response data, including rankings array (team_key, rank, dq, matches_played, qual_average, record, extra_stats, sort_orders) and metadata (extra_stats_info, sort_order_info).
export const RankingSchema = z.object({ rankings: z.array( z.object({ team_key: z.string(), rank: z.number(), dq: z.number().nullish(), matches_played: z.number(), qual_average: z.number().nullish(), record: z .object({ losses: z.number(), wins: z.number(), ties: z.number(), }) .nullish(), extra_stats: z.array(z.number()).nullish(), sort_orders: z.array(z.number()).nullish(), }), ), extra_stats_info: z .array( z.object({ name: z.string(), precision: z.number(), }), ) .nullish(), sort_order_info: z .array( z.object({ name: z.string(), precision: z.number(), }), ) .nullish(), }); - src/schemas.ts:541-543 (schema)GetEventRankingsInputSchema - Zod validation schema for the input, requiring an event_key field.
export const GetEventRankingsInputSchema = z.object({ event_key: EventKeySchema, }); - src/tools.ts:127-136 (registration)Registration of the get_event_rankings tool in the tools array with its name, description, inputSchema, and annotations.
{ name: 'get_event_rankings', description: 'Retrieve the live or final qualification rankings for an FRC event. Returns ordered ranking rows (team key, rank, win/loss/tie record, matches played, qualification average, sort orders, extra stats, DQ count) plus metadata describing each sort criterion (e.g., Ranking Points, Auto, Endgame). Used to determine alliance selection order, seed playoff alliances, and assess team performance during qualification matches.', inputSchema: toMCPSchema(GetEventRankingsInputSchema), annotations: { ...READ_ONLY_API, title: 'Get Event Qualification Rankings', }, }, - src/tools.ts:11-11 (registration)Import of GetEventRankingsInputSchema used for tool registration.
GetEventRankingsInputSchema,