get_team_history
Retrieve comprehensive historical data for FIRST Robotics Competition teams across all competition years to analyze performance trends and track achievements.
Instructions
Get historical data for a team across all years
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| team_key | Yes | Team key in format frcXXXX (e.g., frc86) |
Implementation Reference
- src/handlers.ts:830-842 (handler)The handler implementation for the 'get_team_history' tool. It validates the input team_key using TeamKeySchema, fetches the team history data from the TBA API endpoint `/team/${team_key}/history`, parses the response using TeamHistorySchema, and returns the JSON-formatted history.case 'get_team_history': { const { team_key } = z.object({ team_key: TeamKeySchema }).parse(args); const data = await makeApiRequest(`/team/${team_key}/history`); const history = TeamHistorySchema.parse(data); return { content: [ { type: 'text', text: JSON.stringify(history, null, 2), }, ], }; }
- src/tools.ts:839-852 (registration)The tool registration definition including name, description, and input schema for 'get_team_history'. This object is part of the tools array exported and registered with the MCP server via ListToolsRequestHandler.{ name: 'get_team_history', description: 'Get historical data for a team across all years', inputSchema: { type: 'object', properties: { team_key: { type: 'string', description: 'Team key in format frcXXXX (e.g., frc86)', pattern: '^frc\\d+$', }, }, required: ['team_key'], },
- src/schemas.ts:466-471 (schema)The Zod schema for validating the output of the get_team_history API response, defining the structure with awards, events, matches, and robots arrays.export const TeamHistorySchema = z.object({ awards: z.array(AwardSchema).nullish(), events: z.array(EventSchema).nullish(), matches: z.array(MatchSchema).nullish(), robots: z.array(RobotSchema).nullish(), });
- src/schemas.ts:4-6 (schema)The Zod schema for validating the team_key input parameter, used in the handler for parsing arguments.export const TeamKeySchema = z .string() .regex(/^frc\d+$/, 'Team key must be in format frcXXXX');