Skip to main content
Glama

get_district_teams_simple

Retrieve simplified team information for a specific FIRST Robotics Competition district using The Blue Alliance API.

Instructions

Get simplified teams in a specific district

Input Schema

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

Implementation Reference

  • Handler implementation in the handleToolCall switch statement. Validates district_key input, fetches simplified team list from TBA API endpoint `/district/{district_key}/teams/simple`, parses response as array of TeamSimpleSchema, and returns JSON string.
    case 'get_district_teams_simple': { const { district_key } = z .object({ district_key: z.string() }) .parse(args); const data = await makeApiRequest( `/district/${district_key}/teams/simple`, ); const teams = z.array(TeamSimpleSchema).parse(data); return { content: [ { type: 'text', text: JSON.stringify(teams, null, 2), }, ], }; }
  • src/tools.ts:969-982 (registration)
    Tool registration in the tools array exported for MCP server, including name, description, and input schema definition.
    { name: 'get_district_teams_simple', description: 'Get simplified teams in a specific district', inputSchema: { type: 'object', properties: { district_key: { type: 'string', description: 'District key (e.g., 2023fim)', }, }, required: ['district_key'], }, },
  • Zod schema definition for TeamSimple used to parse the API response in the handler (array of this schema). Defines the structure of simplified team objects.
    export const TeamSimpleSchema = z.object({ key: z.string(), team_number: z.number(), nickname: z.string().nullish(), name: z.string(), city: z.string().nullish(), state_prov: z.string().nullish(), country: z.string().nullish(), });

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