get_teams_simple
Retrieve a paginated list of FRC teams from The Blue Alliance API to access team information in a simplified format.
Instructions
Get simplified list of teams with pagination
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page_num | Yes | Page number (0-indexed) |
Implementation Reference
- src/handlers.ts:453-467 (handler)Handler implementation for the 'get_teams_simple' tool. Validates the input page_num, fetches simplified team data from the TBA API endpoint `/teams/${page_num}/simple`, parses the response using an array of TeamSimpleSchema, and returns the JSON-formatted result.case 'get_teams_simple': { const { page_num } = z .object({ page_num: z.number().min(0) }) .parse(args); const data = await makeApiRequest(`/teams/${page_num}/simple`); const teams = z.array(TeamSimpleSchema).parse(data); return { content: [ { type: 'text', text: JSON.stringify(teams, null, 2), }, ], }; }
- src/tools.ts:425-439 (registration)Tool registration in the tools array, including name, description, and input schema validation for page_num parameter.{ name: 'get_teams_simple', description: 'Get simplified list of teams with pagination', inputSchema: { type: 'object', properties: { page_num: { type: 'number', description: 'Page number (0-indexed)', minimum: 0, }, }, required: ['page_num'], }, },
- src/schemas.ts:369-377 (schema)Output schema (TeamSimpleSchema) used in the handler to validate each simplified team object returned from the API.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(), });