Skip to main content
Glama

get_district_events_keys

Retrieve event keys for a specific FIRST Robotics Competition district to access competition data and schedules.

Instructions

Get event keys in a specific district

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
district_keyYesDistrict key (e.g., 2023fim)

Implementation Reference

  • The main handler logic for the 'get_district_events_keys' tool. It validates the district_key input using Zod, makes an API request to The Blue Alliance for the district's event keys, parses the response as an array of strings, and returns the JSON-formatted result.
    case 'get_district_events_keys': { const { district_key } = z .object({ district_key: z.string() }) .parse(args); const data = await makeApiRequest( `/district/${district_key}/events/keys`, ); const keys = z.array(z.string()).parse(data); return { content: [ { type: 'text', text: JSON.stringify(keys, null, 2), }, ], }; }
  • src/tools.ts:941-954 (registration)
    The tool registration object defining the name, description, and input schema. This is part of the tools array exported and used by the MCP server to list available tools.
    { name: 'get_district_events_keys', description: 'Get event keys in a specific district', inputSchema: { type: 'object', properties: { district_key: { type: 'string', description: 'District key (e.g., 2023fim)', }, }, required: ['district_key'], }, },
  • Output schema validation using Zod to parse the API response as an array of strings.
    const keys = z.array(z.string()).parse(data); return { content: [ { type: 'text', text: JSON.stringify(keys, null, 2), }, ], };

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