get_event_teams
Retrieve teams participating in a specific FIRST Robotics Competition event using The Blue Alliance API. Input an event key to get the list of competing teams.
Instructions
Get teams participating in a specific event
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| event_key | Yes | Event key (e.g., 2023casj) |
Implementation Reference
- src/handlers.ts:137-149 (handler)The main handler function for the 'get_event_teams' tool. It validates the input event_key, fetches the list of teams from the TBA API endpoint `/event/{event_key}/teams`, parses the response using Zod TeamSchema array, and returns the data as a formatted JSON text message.case 'get_event_teams': { const { event_key } = z.object({ event_key: EventKeySchema }).parse(args); const data = await makeApiRequest(`/event/${event_key}/teams`); const teams = z.array(TeamSchema).parse(data); return { content: [ { type: 'text', text: JSON.stringify(teams, null, 2), }, ], }; }
- src/tools.ts:112-125 (registration)The tool registration in the tools array, defining the name, description, and input schema (requiring event_key string). This is used for MCP tool registration.{ name: 'get_event_teams', description: 'Get teams participating in a specific event', inputSchema: { type: 'object', properties: { event_key: { type: 'string', description: 'Event key (e.g., 2023casj)', }, }, required: ['event_key'], }, },
- src/tools.ts:115-124 (schema)Input schema definition for validating the tool parameters in MCP.inputSchema: { type: 'object', properties: { event_key: { type: 'string', description: 'Event key (e.g., 2023casj)', }, }, required: ['event_key'], },