Skip to main content
Glama

get_team_event_status

Retrieve a team's competition rank and status for a specific FIRST Robotics event to track performance and standings.

Instructions

Get team competition rank and status 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 main handler logic for the 'get_team_event_status' tool. It validates the input arguments using Zod schemas, makes an API request to the TBA endpoint `/team/{team_key}/event/{event_key}/status`, parses the response with TeamEventStatusSchema, and returns the result as a JSON string.
    case 'get_team_event_status': {
      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}/status`,
      );
      const status = TeamEventStatusSchema.parse(data);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(status, null, 2),
          },
        ],
      };
    }
  • src/tools.ts:376-394 (registration)
    Registers the 'get_team_event_status' tool in the tools array, providing the name, description, and input schema for MCP.
    {
      name: 'get_team_event_status',
      description: 'Get team competition rank and status 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 for parsing the output of the team event status API response, used in the handler.
    export const TeamEventStatusSchema = z.object({
      qual: z
        .object({
          num_teams: z.number().nullish(),
          ranking: z
            .object({
              dq: z.number().nullish(),
              matches_played: z.number(),
              qual_average: z.number().nullish(),
              rank: z.number(),
              record: z
                .object({
                  losses: z.number(),
                  ties: z.number(),
                  wins: z.number(),
                })
                .nullish(),
              sort_orders: z.array(z.number()).nullish(),
              team_key: z.string(),
            })
            .nullish(),
          sort_order_info: z
            .array(
              z.object({
                name: z.string(),
                precision: z.number(),
              }),
            )
            .nullish(),
          status: z.string().nullish(),
        })
        .nullish(),
      alliance: z
        .object({
          backup: z
            .object({
              in: z.string().nullish(),
              out: z.string().nullish(),
            })
            .nullish(),
          name: z.string().nullish(),
          number: z.number().nullish(),
          pick: z.number().nullish(),
        })
        .nullish(),
      playoff: z
        .object({
          current_level_record: z
            .object({
              losses: z.number(),
              ties: z.number(),
              wins: z.number(),
            })
            .nullish(),
          level: z.string().nullish(),
          playoff_average: z.number().nullish(),
          record: z
            .object({
              losses: z.number(),
              ties: z.number(),
              wins: z.number(),
            })
            .nullish(),
          status: z.string().nullish(),
        })
        .nullish(),
      alliance_status_str: z.string(),
      playoff_status_str: z.string(),
      overall_status_str: z.string(),
      next_match_key: z.string().nullish(),
      last_match_key: z.string().nullish(),
    });
  • Input validation schema for team_key used in the handler.
    export const TeamKeySchema = z
      .string()
      .regex(/^frc\d+$/, 'Team key must be in format frcXXXX');
  • Input validation schema for event_key used in the handler.
    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