Skip to main content
Glama

get_events_keys

Retrieve event keys for a specific FIRST Robotics Competition year to access detailed event data through The Blue Alliance API.

Instructions

Get list of event keys for a year

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
yearYesCompetition year

Implementation Reference

  • The core handler for the 'get_events_keys' tool. Validates the 'year' input using YearSchema, fetches event keys from TBA API endpoint `/events/${year}/keys`, parses response as array of strings, and returns formatted JSON response.
    case 'get_events_keys': { const { year } = z.object({ year: YearSchema }).parse(args); const data = await makeApiRequest(`/events/${year}/keys`); const keys = z.array(z.string()).parse(data); return { content: [ { type: 'text', text: JSON.stringify(keys, null, 2), }, ], }; }
  • src/tools.ts:563-578 (registration)
    Registers the 'get_events_keys' tool in the tools array exported for MCP server list tools handler, including description and input schema matching YearSchema constraints.
    { name: 'get_events_keys', description: 'Get list of event keys for a year', inputSchema: { type: 'object', properties: { year: { type: 'number', description: 'Competition year', minimum: 1992, maximum: new Date().getFullYear() + 1, }, }, required: ['year'], }, },
  • YearSchema Zod schema used for runtime input validation of the 'year' parameter in the get_events_keys handler.
    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