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
| Name | Required | Description | Default |
|---|---|---|---|
| district_key | Yes | District key (e.g., 2023fim) |
Implementation Reference
- src/handlers.ts:959-973 (handler)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'], }, },
- src/handlers.ts:964-964 (schema)Output schema validation using TeamSchema array for parsing API response.const teams = z.array(TeamSchema).parse(data);