get_team
Retrieve detailed information about a specific FIRST Robotics Competition team using its official team key.
Instructions
Get detailed information about a specific FRC team
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| team_key | Yes | Team key in format frcXXXX (e.g., frc86) |
Implementation Reference
- src/handlers.ts:38-50 (handler)The handler case for 'get_team' tool that validates input with TeamKeySchema, fetches team data from TBA API using makeApiRequest, parses output with TeamSchema, and returns formatted JSON response.case 'get_team': { const { team_key } = z.object({ team_key: TeamKeySchema }).parse(args); const data = await makeApiRequest(`/team/${team_key}`); const team = TeamSchema.parse(data); return { content: [ { type: 'text', text: JSON.stringify(team, null, 2), }, ], }; }
- src/tools.ts:4-18 (registration)Registers the 'get_team' tool for MCP protocol, including name, description, and JSON schema for input validation.{ name: 'get_team', description: 'Get detailed information about a specific FRC team', inputSchema: { type: 'object', properties: { team_key: { type: 'string', description: 'Team key in format frcXXXX (e.g., frc86)', pattern: '^frc\\d+$', }, }, required: ['team_key'], }, },
- src/schemas.ts:4-6 (schema)Zod schema for validating the team_key input parameter used in the get_team handler.export const TeamKeySchema = z .string() .regex(/^frc\d+$/, 'Team key must be in format frcXXXX');
- src/schemas.ts:17-36 (schema)Zod schema for validating the team data returned from the TBA API in the get_team handler.export const TeamSchema = 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(), address: z.string().nullish(), postal_code: z.string().nullish(), gmaps_place_id: z.string().nullish(), gmaps_url: z.string().nullish(), lat: z.number().nullish(), lng: z.number().nullish(), location_name: z.string().nullish(), website: z.string().nullish(), rookie_year: z.number().nullish(), motto: z.string().nullish(), home_championship: z.record(z.string(), z.any()).nullish(), });