Skip to main content
Glama

get_team_districts

Retrieve district history for FIRST Robotics Competition teams to track their regional participation and competitive progression over time.

Instructions

Get district history for a team

Input Schema

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

Implementation Reference

  • Executes the get_team_districts tool: validates team_key input, fetches district data from TBA API, parses with DistrictSchema array, returns JSON string.
    case 'get_team_districts': { const { team_key } = z.object({ team_key: TeamKeySchema }).parse(args); const data = await makeApiRequest(`/team/${team_key}/districts`); const districts = z.array(DistrictSchema).parse(data); return { content: [ { type: 'text', text: JSON.stringify(districts, null, 2), }, ], }; }
  • src/tools.ts:211-225 (registration)
    Registers the get_team_districts tool in the tools array with name, description, and input schema definition.
    { name: 'get_team_districts', description: 'Get district history for a team', 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 District objects used to validate the tool's output data.
    export const DistrictSchema = z.object({ abbreviation: z.string(), display_name: z.string(), key: z.string(), year: z.number(), });
  • Zod schema for team_key input parameter used in the tool handler for validation.
    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