Skip to main content
Glama

get_event_oprs

Retrieve team performance ratings (OPR, DPR, CCWM) for a specific FIRST Robotics Competition event to analyze competitive data.

Instructions

Get OPR, DPR, and CCWM ratings for teams at an event

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
event_keyYesEvent key (e.g., 2023casj)

Implementation Reference

  • Handler implementation for the 'get_event_oprs' tool. Parses input arguments using Zod schema, fetches OPR/DPR/CCWM data from The Blue Alliance API endpoint `/event/{event_key}/oprs`, validates response with EventOPRsSchema, and returns formatted text content with JSON string.
    case 'get_event_oprs': { const { event_key } = z.object({ event_key: EventKeySchema }).parse(args); const data = await makeApiRequest(`/event/${event_key}/oprs`); const oprs = EventOPRsSchema.parse(data); return { content: [ { type: 'text', text: JSON.stringify(oprs, null, 2), }, ], }; }
  • src/tools.ts:318-331 (registration)
    Tool registration definition in the tools array exported for MCP list_tools handler. Includes name, description, and JSON input schema for event_key parameter.
    { name: 'get_event_oprs', description: 'Get OPR, DPR, and CCWM ratings for teams at an event', inputSchema: { type: 'object', properties: { event_key: { type: 'string', description: 'Event key (e.g., 2023casj)', }, }, required: ['event_key'], }, },
  • Zod schema used in the handler for output validation of the TBA API response containing OPRs, DPRs, and CCWM values for teams at the event.
    export const EventOPRsSchema = z.object({ oprs: z.record(z.string(), z.number()), dprs: z.record(z.string(), z.number()), ccwms: z.record(z.string(), z.number()), });
  • Zod schema for validating the event_key input parameter used in the handler.
    export const EventKeySchema = z.string();

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/withinfocus/tba'

If you have feedback or need assistance with the MCP directory API, please join our Discord server