Skip to main content
Glama

get_team_awards

Retrieve awards won by a FIRST Robotics Competition team in a specific year using The Blue Alliance API. Input team key (frcXXXX) and year to access competition achievements.

Instructions

Get awards won by 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_awards tool: parses team_key and year, fetches awards from TBA API, validates with AwardSchema, returns JSON stringified response.
    case 'get_team_awards': { const { team_key, year } = z .object({ team_key: TeamKeySchema, year: YearSchema, }) .parse(args); const data = await makeApiRequest(`/team/${team_key}/awards/${year}`); const awards = z.array(AwardSchema).parse(data); return { content: [ { type: 'text', text: JSON.stringify(awards, null, 2), }, ], }; }
  • src/tools.ts:40-60 (registration)
    Registers the get_team_awards tool in the MCP tools list with name, description, and input schema validation.
    { name: 'get_team_awards', description: 'Get awards won by 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 defining the structure of award objects returned by the TBA API for team awards.
    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 the year parameter (input).
    export const YearSchema = z .number() .int() .min(1992) .max(new Date().getFullYear() + 1);
  • Zod schema for validating the team_key parameter (input).
    export const TeamKeySchema = z .string() .regex(/^frc\d+$/, 'Team key must be in format frcXXXX');

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