Skip to main content
Glama

get_team_event_awards

Retrieve awards earned by a specific FRC team at a particular FIRST Robotics Competition event. Use this tool to access team achievement data from The Blue Alliance database.

Instructions

Get awards won by 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 logic: validates team_key and event_key inputs using Zod schemas, makes API request to TBA /team/{team_key}/event/{event_key}/awards, parses awards array, returns JSON stringified response.
    case 'get_team_event_awards': {
      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}/awards`,
      );
      const awards = z.array(AwardSchema).parse(data);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(awards, null, 2),
          },
        ],
      };
    }
  • src/tools.ts:635-653 (registration)
    Registers the MCP tool with name, description, and input schema matching the handler's expected arguments.
    {
      name: 'get_team_event_awards',
      description: 'Get awards won by 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 to parse the array of awards returned from the TBA API in the handler.
    export const AwardSchema = z.object({
      name: z.string(),
      award_type: z.number(),
      event_key: z.string(),
      recipient_list: z.array(
        z.object({
          team_key: z.string().nullish(),
          awardee: z.string().nullish(),
        }),
      ),
      year: z.number(),
    });
  • Zod schema for validating team_key input parameter.
    export const TeamKeySchema = z
      .string()
      .regex(/^frc\d+$/, 'Team key must be in format frcXXXX');
  • Zod schema for validating event_key input 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