Skip to main content
Glama

get_team_robots

Retrieve robot names for a specific FIRST Robotics Competition team by year using The Blue Alliance API.

Instructions

Get robot names for a team by year

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
team_keyYesTeam key in format frcXXXX (e.g., frc86)

Implementation Reference

  • Handler logic for the 'get_team_robots' tool. Validates the team_key input using TeamKeySchema, fetches robot data from the TBA API endpoint `/team/{team_key}/robots`, parses the response as an array of RobotSchema objects, and returns the JSON stringified data.
    case 'get_team_robots': {
      const { team_key } = z.object({ team_key: TeamKeySchema }).parse(args);
      const data = await makeApiRequest(`/team/${team_key}/robots`);
      const robots = z.array(RobotSchema).parse(data);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(robots, null, 2),
          },
        ],
      };
    }
  • src/tools.ts:227-240 (registration)
    Tool registration in the MCP tools array, including name, description, and input schema for 'get_team_robots'.
      name: 'get_team_robots',
      description: 'Get robot names for a team by year',
      inputSchema: {
        type: 'object',
        properties: {
          team_key: {
            type: 'string',
            description: 'Team key in format frcXXXX (e.g., frc86)',
            pattern: '^frc\\d+$',
          },
        },
        required: ['team_key'],
      },
    },
  • Zod schema definition for Robot objects returned by the TBA /team/{team_key}/robots API endpoint.
    export const RobotSchema = z.object({
      year: z.number(),
      robot_name: z.string(),
      key: z.string(),
      team_key: z.string(),
    });
  • Zod schema for validating team_key input parameter (format frcXXXX).
    export const TeamKeySchema = z
      .string()
      .regex(/^frc\d+$/, 'Team key must be in format frcXXXX');
  • src/index.ts:45-47 (registration)
    MCP server registration of the listTools handler which returns the full tools array including 'get_team_robots'.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return { tools };
    });

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