get_team_years_participated
Retrieve a list of all FRC competition years for a team to analyze their participation history and determine rookie year.
Instructions
Retrieve every season year in which a team has competed in FRC, sorted ascending. Returns a flat array of year integers. Use to bound year-based queries, drive per-year iteration, or determine a team's longevity and rookie year.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| team_key | Yes | FRC team key formatted as 'frc' followed by the team number with no leading zeros (e.g., 'frc86', 'frc254', 'frc1114'). Uniquely identifies a FIRST Robotics Competition team on The Blue Alliance. |
Implementation Reference
- src/handlers.ts:221-233 (handler)Handler for 'get_team_years_participated' tool. Parses team_key from args, calls the Blue Alliance API endpoint /team/{team_key}/years_participated, validates that the response is an array of numbers, and returns the years as JSON text.
case 'get_team_years_participated': { const { team_key } = z.object({ team_key: TeamKeySchema }).parse(args); const data = await makeApiRequest(`/team/${team_key}/years_participated`); const years = z.array(z.number()).parse(data); return { content: [ { type: 'text', text: JSON.stringify(years, null, 2), }, ], }; } - src/schemas.ts:561-563 (schema)Zod input schema for get_team_years_participated - requires team_key validated against TeamKeySchema (format 'frcXXXX').
export const GetTeamYearsParticipatedInputSchema = z.object({ team_key: TeamKeySchema, }); - src/tools.ts:165-171 (registration)Tool registration definition. Declares name 'get_team_years_participated' with description and input schema binding. Uses READ_ONLY_API annotations and has title 'Get Team Years Participated'.
{ name: 'get_team_years_participated', description: "Retrieve every season year in which a team has competed in FRC, sorted ascending. Returns a flat array of year integers. Use to bound year-based queries, drive per-year iteration, or determine a team's longevity and rookie year.", inputSchema: toMCPSchema(GetTeamYearsParticipatedInputSchema), annotations: { ...READ_ONLY_API, title: 'Get Team Years Participated' }, }, - src/tools.ts:16-28 (helper)Import of GetTeamYearsParticipatedInputSchema from schemas.ts into tools.ts for use in the tool registration.
GetTeamYearsParticipatedInputSchema, GetTeamDistrictsInputSchema, GetTeamRobotsInputSchema, GetTeamMediaInputSchema, GetTeamEventMatchesInputSchema, GetTeamsInputSchema, GetStatusInputSchema, GetMatchInputSchema, GetEventOprsInputSchema, GetEventAwardsInputSchema, GetTeamAwardsAllInputSchema, GetTeamEventsAllInputSchema, GetTeamEventStatusInputSchema,