Skip to main content
Glama

get_team_events_keys

Retrieve event keys for a specific FRC team in a given competition year using The Blue Alliance API.

Instructions

Get event keys for a team in a specific year

Input Schema

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

Implementation Reference

  • The handler case in the switch statement that executes the get_team_events_keys tool: validates input using Zod schemas, calls the TBA API to retrieve event keys for a team in a given year, parses the array of strings, and returns it as formatted JSON text content.
    case 'get_team_events_keys': { const { team_key, year } = z .object({ team_key: TeamKeySchema, year: YearSchema, }) .parse(args); const data = await makeApiRequest( `/team/${team_key}/events/${year}/keys`, ); const keys = z.array(z.string()).parse(data); return { content: [ { type: 'text', text: JSON.stringify(keys, null, 2), }, ], }; }
  • src/tools.ts:615-634 (registration)
    The tool registration object in the tools array exported from tools.ts, which includes the name, description, and inputSchema. This array is used by index.ts to register tools with the MCP server.
    name: 'get_team_events_keys', description: 'Get event keys for a team in a specific year', inputSchema: { type: 'object', properties: { team_key: { type: 'string', description: 'Team key in format frcXXXX (e.g., frc86)', pattern: '^frc\\d+$', }, year: { type: 'number', description: 'Competition year', minimum: 1992, maximum: new Date().getFullYear() + 1, }, }, required: ['team_key', 'year'], }, },
  • Zod schema for team_key validation used in the handler's input parsing.
    export const TeamKeySchema = z .string() .regex(/^frc\d+$/, 'Team key must be in format frcXXXX');
  • Zod schema for year validation used in the handler's input parsing.
    export const YearSchema = z .number() .int() .min(1992) .max(new Date().getFullYear() + 1);

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