Skip to main content
Glama

get_team_events_simple

Retrieve simplified event data for a FIRST Robotics Competition team in a specific year to track competition participation and schedules.

Instructions

Get simplified events 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 core handler logic for the 'get_team_events_simple' tool. It validates input parameters using Zod schemas (TeamKeySchema and YearSchema), fetches simplified event data for the team and year from The Blue Alliance API, validates the response using EventSimpleSchema, and returns the events as a formatted JSON string.
    case 'get_team_events_simple': { const { team_key, year } = z .object({ team_key: TeamKeySchema, year: YearSchema, }) .parse(args); const data = await makeApiRequest( `/team/${team_key}/events/${year}/simple`, ); const events = z.array(EventSimpleSchema).parse(data); return { content: [ { type: 'text', text: JSON.stringify(events, null, 2), }, ], }; }
  • src/tools.ts:594-613 (registration)
    MCP tool registration definition for 'get_team_events_simple', including the tool name, description, and JSON input schema for parameter validation. This object is part of the tools array exported and used by the MCP server for tool listing.
    name: 'get_team_events_simple', description: 'Get simplified events 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 (EventSimpleSchema) used in the handler to parse and validate the array of simplified event objects returned from the TBA API.
    export const EventSimpleSchema = z.object({ key: z.string(), name: z.string(), event_code: z.string(), event_type: z.number(), city: z.string().nullish(), state_prov: z.string().nullish(), country: z.string().nullish(), start_date: z.string(), end_date: z.string(), year: z.number(), });
  • Zod input validation schemas (TeamKeySchema and YearSchema) used in the handler to parse tool arguments.
    export const TeamKeySchema = z .string() .regex(/^frc\d+$/, 'Team key must be in format frcXXXX');
  • src/index.ts:45-47 (registration)
    MCP server registration of the tools list, responding to ListToolsRequest with the array of tool definitions including 'get_team_events_simple'.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; });

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