Skip to main content
Glama

get_team_matches_keys

Retrieve match keys for a specific FRC team in a given competition year to access detailed match data and analyze team performance.

Instructions

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

  • Executes the get_team_matches_keys tool: validates team_key and year inputs using Zod, fetches match keys from TBA API /team/{team_key}/matches/{year}/keys, parses response as string array, returns formatted JSON.
    case 'get_team_matches_keys': {
      const { team_key, year } = z
        .object({
          team_key: TeamKeySchema,
          year: YearSchema,
        })
        .parse(args);
      const data = await makeApiRequest(
        `/team/${team_key}/matches/${year}/keys`,
      );
      const keys = z.array(z.string()).parse(data);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(keys, null, 2),
          },
        ],
      };
    }
  • src/tools.ts:675-695 (registration)
    Registers the get_team_matches_keys tool in the tools array with name, description, and input schema definition for MCP.
    {
      name: 'get_team_matches_keys',
      description: 'Get match 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 input validation schemas for team_key (TeamKeySchema) and year (YearSchema) used in the handler's argument parsing.
    export const TeamKeySchema = z
      .string()
      .regex(/^frc\d+$/, 'Team key must be in format frcXXXX');
    
    export const EventKeySchema = z.string();
    
    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