get_event_alliances
Retrieve elimination alliance information for FIRST Robotics Competition events to analyze team partnerships and playoff structures.
Instructions
Get elimination alliances for a specific event
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| event_key | Yes | Event key (e.g., 2023casj) |
Implementation Reference
- src/handlers.ts:179-191 (handler)Handler function for the 'get_event_alliances' tool. Parses event_key argument, fetches alliances data from The Blue Alliance API, validates with Zod schema, and returns JSON stringified response.case 'get_event_alliances': { const { event_key } = z.object({ event_key: EventKeySchema }).parse(args); const data = await makeApiRequest(`/event/${event_key}/alliances`); const alliances = z.array(AllianceSchema).parse(data); return { content: [ { type: 'text', text: JSON.stringify(alliances, null, 2), }, ], }; }
- src/tools.ts:154-167 (registration)Tool registration object defining name, description, and input schema for 'get_event_alliances' in the exported tools array used by the MCP server.{ name: 'get_event_alliances', description: 'Get elimination alliances for a specific event', inputSchema: { type: 'object', properties: { event_key: { type: 'string', description: 'Event key (e.g., 2023casj)', }, }, required: ['event_key'], }, },
- src/schemas.ts:173-204 (schema)Zod schema (AllianceSchema) for validating the API response data of event alliances, used in the tool handler.export const AllianceSchema = z.object({ name: z.string().nullish(), backup: z .object({ in: z.string().nullish(), out: z.string().nullish(), }) .nullish(), declines: z.array(z.string()).nullish(), picks: z.array(z.string()), status: z .object({ current_level_record: z .object({ losses: z.number(), ties: z.number(), wins: z.number(), }) .nullish(), level: z.string().nullish(), playoff_average: z.number().nullish(), record: z .object({ losses: z.number(), ties: z.number(), wins: z.number(), }) .nullish(), status: z.string().nullish(), }) .nullish(), });
- src/schemas.ts:8-8 (schema)Zod schema (EventKeySchema) for input validation of event_key parameter, used in the tool handler.export const EventKeySchema = z.string();