Skip to main content
Glama

get_team_years_participated

Retrieve the competition years a specific FRC team has participated in using The Blue Alliance API. Provide the team key in frcXXXX format to get historical participation data.

Instructions

Get years that a team has participated in competition

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
team_keyYesTeam key in format frcXXXX (e.g., frc86)

Implementation Reference

  • The main handler logic for the 'get_team_years_participated' tool. It validates the input args using TeamKeySchema, makes an API request to The Blue Alliance for the team's years participated, parses the response as an array of numbers, and returns it as a JSON string in the tool response format.
    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/tools.ts:196-210 (registration)
    The tool registration entry in the exported tools array, defining the name, description, and input schema for 'get_team_years_participated'. This is used by the MCP server to list available tools.
    { name: 'get_team_years_participated', description: 'Get years that a team has participated in competition', inputSchema: { type: 'object', properties: { team_key: { type: 'string', description: 'Team key in format frcXXXX (e.g., frc86)', pattern: '^frc\\d+$', }, }, required: ['team_key'], }, },
  • Zod schema for validating team_key input (format frcXXXX), imported and used in the handler for input parsing.
    export const TeamKeySchema = z .string() .regex(/^frc\d+$/, 'Team key must be in format frcXXXX');

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/withinfocus/tba'

If you have feedback or need assistance with the MCP directory API, please join our Discord server