Skip to main content
Glama

get_team_event_matches_simple

Retrieve simplified match data for a specific FIRST Robotics Competition team at a particular event using The Blue Alliance API.

Instructions

Get simplified matches for a team at a specific event

Input Schema

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

Implementation Reference

  • Executes the tool by validating inputs with Zod, fetching simplified match data for a team at a specific event from the TBA API, parsing the response, and returning it as formatted JSON.
    case 'get_team_event_matches_simple': { const { team_key, event_key } = z .object({ team_key: TeamKeySchema, event_key: EventKeySchema, }) .parse(args); const data = await makeApiRequest( `/team/${team_key}/event/${event_key}/matches/simple`, ); const matches = z.array(MatchSimpleSchema).parse(data); return { content: [ { type: 'text', text: JSON.stringify(matches, null, 2), }, ], };
  • src/tools.ts:875-893 (registration)
    Registers the tool in the MCP tools list with name, description, and input schema definition.
    { name: 'get_team_event_matches_simple', description: 'Get simplified matches for a team at a specific event', inputSchema: { type: 'object', properties: { team_key: { type: 'string', description: 'Team key in format frcXXXX (e.g., frc86)', pattern: '^frc\\d+$', }, event_key: { type: 'string', description: 'Event key (e.g., 2023casj)', }, }, required: ['team_key', 'event_key'], }, },
  • Zod schema definition for validating the simplified match objects returned by the TBA API.
    export const MatchSimpleSchema = z.object({ key: z.string(), comp_level: z.string(), set_number: z.number(), match_number: z.number(), alliances: z.object({ red: z.object({ score: z.number(), team_keys: z.array(z.string()), }), blue: z.object({ score: z.number(), team_keys: z.array(z.string()), }), }), winning_alliance: z.string().nullish(), event_key: z.string(), time: z.number().nullish(), predicted_time: z.number().nullish(), actual_time: z.number().nullish(), });
  • Zod schema for validating team keys used in input.
    export const TeamKeySchema = z .string() .regex(/^frc\d+$/, 'Team key must be in format frcXXXX');
  • Zod schema for validating event keys used in input.
    export const EventKeySchema = z.string();

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