get_teams_keys
Retrieve paginated team keys from The Blue Alliance API to access FIRST Robotics Competition team data efficiently.
Instructions
Get list of team keys with pagination
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page_num | Yes | Page number (0-indexed) |
Implementation Reference
- src/handlers.ts:469-483 (handler)Handler function in switch statement that validates page_num input using Zod, fetches team keys from The Blue Alliance API endpoint `/teams/${page_num}/keys`, validates output as array of strings, and returns JSON-formatted response.case 'get_teams_keys': { const { page_num } = z .object({ page_num: z.number().min(0) }) .parse(args); const data = await makeApiRequest(`/teams/${page_num}/keys`); const keys = z.array(z.string()).parse(data); return { content: [ { type: 'text', text: JSON.stringify(keys, null, 2), }, ], }; }
- src/tools.ts:440-454 (registration)MCP tool registration including name, description, and JSON input schema for page_num (non-negative integer). Used by the server to list available tools.{ name: 'get_teams_keys', description: 'Get list of team keys with pagination', inputSchema: { type: 'object', properties: { page_num: { type: 'number', description: 'Page number (0-indexed)', minimum: 0, }, }, required: ['page_num'], }, },