get_match_zebra
Retrieve Zebra MotionWorks tracking data for FIRST Robotics Competition matches to analyze robot movement and performance metrics.
Instructions
Get Zebra MotionWorks data for a match
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| match_key | Yes | Match key (e.g., 2023casj_qm1) |
Implementation Reference
- src/handlers.ts:1009-1021 (handler)The main handler case for 'get_match_zebra' that parses input, calls the TBA API for zebra motion data, validates with ZebraSchema, and returns JSON.case 'get_match_zebra': { const { match_key } = z.object({ match_key: z.string() }).parse(args); const data = await makeApiRequest(`/match/${match_key}/zebra`); const zebra = ZebraSchema.parse(data); return { content: [ { type: 'text', text: JSON.stringify(zebra, null, 2), }, ], }; }
- src/tools.ts:826-838 (schema)MCP tool schema definition for 'get_match_zebra', including input validation schema.name: 'get_match_zebra', description: 'Get Zebra MotionWorks data for a match', inputSchema: { type: 'object', properties: { match_key: { type: 'string', description: 'Match key (e.g., 2023casj_qm1)', }, }, required: ['match_key'], }, },
- src/schemas.ts:414-433 (schema)Zod schema for validating the Zebra MotionWorks data output.export const ZebraSchema = z.object({ key: z.string(), times: z.array(z.number()), alliances: z.object({ red: z.array( z.object({ team_key: z.string(), xs: z.array(z.number()).nullish(), ys: z.array(z.number()).nullish(), }), ), blue: z.array( z.object({ team_key: z.string(), xs: z.array(z.number()).nullish(), ys: z.array(z.number()).nullish(), }), ), }), });
- src/index.ts:45-47 (registration)Registration of the tools list (which includes get_match_zebra) with the MCP server for handling listTools requests.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; });