Skip to main content
Glama

get_district_teams

Retrieve FIRST Robotics Competition teams for a specific district using The Blue Alliance API. Provide a district key to access team data.

Instructions

Get teams in a specific district

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
district_keyYesDistrict key (e.g., 2023fim)

Implementation Reference

  • Handler implementation for the 'get_district_teams' tool. Parses district_key from args, fetches team data from API endpoint `/district/{district_key}/teams`, validates with TeamSchema array, and returns JSON-stringified response.
    case 'get_district_teams': {
      const { district_key } = z
        .object({ district_key: z.string() })
        .parse(args);
      const data = await makeApiRequest(`/district/${district_key}/teams`);
      const teams = z.array(TeamSchema).parse(data);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(teams, null, 2),
          },
        ],
      };
    }
  • src/tools.ts:956-968 (registration)
    Tool registration including name, description, and input schema definition for 'get_district_teams'.
      name: 'get_district_teams',
      description: 'Get teams in a specific district',
      inputSchema: {
        type: 'object',
        properties: {
          district_key: {
            type: 'string',
            description: 'District key (e.g., 2023fim)',
          },
        },
        required: ['district_key'],
      },
    },
  • Output schema validation using TeamSchema array for parsing API response.
    const teams = z.array(TeamSchema).parse(data);

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