Skip to main content
Glama

get_events

Read-onlyIdempotent

List FRC events filtered by year, location, type, or week. Returns event details including dates, EPA stats, and predictions.

Instructions

List FIRST Robotics Competition (FRC) events with optional filters - the discovery tool for finding event keys and browsing the season schedule. Returns an array of events with name, key, dates, location, week, type, EPA stats, and predictions. Filter by year (4-digit, >=2002), country, state, district, type (regional, district, district_cmp, champs_div, einstein, offseason), and week (0-8 of the season; 8 = championship). Sort with metric/ascending and paginate with limit/offset. Use this to answer "what regionals were in California in 2024?", "list all week 1 events this year", or "find the FRC championship divisions" (year=YEAR, type="champs_div"). If you need a single event you already know, use get_event.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
yearNoFour-digit year (2002 onwards)
countryNoCapitalized country name, e.g. USA or Canada.
stateNoCapitalized two-letter state code, e.g. NC.
districtNoDistrict abbreviation. One of: ca, fch, fim, fin, fit, fma, fnc, fsc, isr, ne, ont, pch, pnw, win.
typeNoOne of: regional, district, district_cmp, champs_div, einstein, or offseason.
weekNoWeek of the competition season. 8 is CMP.
metricNoHow to sort the returned values. Any column in the table is valid.
ascendingNoWhether to sort in ascending order. Default is ascending.
limitNoMaximum number of results to return (1-1000). Default is 1000.
offsetNoOffset from the first result to return.

Implementation Reference

  • Handler function case for 'get_events' tool. Parses input with GetEventsInputSchema (year, country, state, district, type, week, metric, ascending, limit, offset), builds query string, and calls Statbotics API endpoint /v3/events.
    case 'get_events': {
      const {
        year,
        country,
        state,
        district,
        type,
        week,
        metric,
        ascending,
        limit,
        offset,
      } = GetEventsInputSchema.parse(args);
      const qs = buildQueryString({
        year,
        country,
        state,
        district,
        type,
        week,
        metric,
        ascending,
        limit,
        offset,
      });
      const data = await makeApiRequest(`/v3/events${qs}`);
      return {
        content: [{ type: 'text', text: JSON.stringify(data, null, 2) }],
      };
    }
  • GetEventsInputSchema: Zod schema defining input validation for the get_events tool. Fields: year (optional), country (optional), state (optional), district (optional), type (optional), week (optional), plus pagination/sort fields (metric, ascending, limit, offset).
    export const GetEventsInputSchema = z.object({
      year: YearSchema.optional().describe('Four-digit year (2002 onwards)'),
      country: CountrySchema,
      state: StateSchema,
      district: DistrictSchema,
      type: EventTypeSchema,
      week: WeekSchema,
      ...PaginationSortFields,
    });
  • src/tools.ts:152-170 (registration)
    Tool registration object for 'get_events'. Defines the tool name, description (list/search FRC events with filters), readOnly annotations, and input schema converted via toMCPSchema(GetEventsInputSchema).
    {
      name: 'get_events',
      description:
        'List FIRST Robotics Competition (FRC) events with optional filters - the discovery tool for finding ' +
        'event keys and browsing the season schedule. ' +
        'Returns an array of events with name, key, dates, location, week, type, EPA stats, and predictions. ' +
        'Filter by `year` (4-digit, >=2002), `country`, `state`, `district`, `type` ' +
        '(regional, district, district_cmp, champs_div, einstein, offseason), and `week` ' +
        '(0-8 of the season; 8 = championship). ' +
        'Sort with `metric`/`ascending` and paginate with `limit`/`offset`. ' +
        'Use this to answer "what regionals were in California in 2024?", "list all week 1 events this year", ' +
        'or "find the FRC championship divisions" (year=YEAR, type="champs_div"). ' +
        'If you need a single event you already know, use get_event.',
      annotations: {
        title: 'List/Search FRC Events',
        ...readOnlyAnnotations,
      },
      inputSchema: toMCPSchema(GetEventsInputSchema),
    },
  • makeApiRequest helper used by the get_events handler. Makes an HTTP GET request to https://api.statbotics.io/v3/events with query parameters and returns parsed JSON.
    export async function makeApiRequest(endpoint: string): Promise<unknown> {
      try {
        const url = `https://api.statbotics.io${endpoint}`;
    
        const response = await fetch(url, {
          headers: {
            Accept: 'application/json',
          },
        });
    
        if (!response.ok) {
          const errorMessage = `Statbotics API request failed: ${response.status} ${response.statusText} for endpoint ${endpoint}`;
          await log('error', errorMessage);
          throw new Error(errorMessage);
        }
    
        return response.json();
      } catch (error) {
        if (error instanceof Error) {
          const errorMessage = `API request error for endpoint ${endpoint}: ${error.message}`;
          await log('error', errorMessage);
          throw error;
        }
        const errorMessage = `Unknown error during API request for endpoint ${endpoint}`;
        await log('error', `${errorMessage}: ${error}`);
        throw new Error(errorMessage);
      }
    }
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true. The description adds value by specifying the return shape ('array of events with name, key, dates, location, week, type, EPA stats, and predictions') and behavior for sorting/pagination. No contradictions; it enriches understanding.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise yet comprehensive, using well-structured sentences: purpose, return fields, parameter guide, examples, and sibling comparison. No redundant text; each sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the 10 optional parameters and no output schema, the description fully covers filters, sorting, pagination, return type, and provides interactive examples. It also references the sibling tool, making it complete for an AI agent to select and invoke correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with descriptions for each parameter, but the description adds extra meaning by grouping filters and explaining their purpose (e.g., 'week 0-8 of the season; 8 = championship'). It also details sorting and pagination parameters beyond the schema's basic descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'List FIRST Robotics Competition (FRC) events' and positions it as a discovery tool. It differentiates from the sibling get_event by noting it's for finding event keys and browsing the season schedule, with examples like 'what regionals were in California in 2024?'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit usage scenarios with example queries and mentions when to use the sibling get_event instead ('If you need a single event you already know, use get_event.'). It explains the role of each filter parameter in context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/statbotics-mcp-server'

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