Skip to main content
Glama

get_team_event_matches_keys

Retrieve match keys for a specific team at a FIRST Robotics Competition event using The Blue Alliance API. Input team and event keys to access match data.

Instructions

Get match keys 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

  • The core handler logic for the 'get_team_event_matches_keys' tool. Validates inputs using Zod schemas (TeamKeySchema and EventKeySchema), makes an API request to The Blue Alliance (TBA) for match keys at a specific team-event combination, parses the response as an array of strings, and returns the JSON-formatted list.
    case 'get_team_event_matches_keys': {
      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/keys`,
      );
      const keys = z.array(z.string()).parse(data);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(keys, null, 2),
          },
        ],
      };
    }
  • src/tools.ts:894-912 (registration)
    Tool registration in the exported tools array, including name, description, and JSON input schema for MCP tool discovery and validation.
    {
      name: 'get_team_event_matches_keys',
      description: 'Get match keys 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 used in the handler for strict runtime validation of the team_key parameter.
    export const TeamKeySchema = z
      .string()
      .regex(/^frc\d+$/, 'Team key must be in format frcXXXX');
  • Zod schema used in the handler for runtime validation of the event_key parameter.
    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