Skip to main content
Glama

get_match

Read-onlyIdempotent

Retrieve detailed results and predictions for a single FRC match using its match key. Get final scores, alliance teams, win probability, and predicted score.

Instructions

Look up a single FIRST Robotics Competition (FRC) match by its match key. Returns full match detail: red and blue alliance team lists, final scores by alliance and component (auto, teleop, endgame, fouls), ranking points awarded, win/tie outcome, the Statbotics pre-match win probability and predicted score, and elimination flag. Match keys follow the format <event-key>_<match-code>, e.g. "2024flor_qm20" (qualification match 20), "2024flor_sf2m1" (semifinal 2 match 1), "2024flor_f1m3" (finals match 3). Use this to answer "who won 2024flor_qm20?", "what was the predicted vs actual score?", or to get alliance compositions for a known match. For browsing many matches, use get_matches.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
matchYesMatch key, e.g. 2024flor_qm20

Implementation Reference

  • Handler for the 'get_match' tool. Parses the 'match' argument from the input, makes an HTTP GET request to https://api.statbotics.io/v3/match/{match}, and returns the JSON data.
    case 'get_match': {
      const { match } = GetMatchInputSchema.parse(args);
      const data = await makeApiRequest(`/v3/match/${match}`);
      return {
        content: [{ type: 'text', text: JSON.stringify(data, null, 2) }],
      };
    }
  • src/tools.ts:204-221 (registration)
    Registration of the 'get_match' tool as a Tool object, defining its name, description, annotations, and inputSchema (derived from GetMatchInputSchema).
    {
      name: 'get_match',
      description:
        'Look up a single FIRST Robotics Competition (FRC) match by its match key. ' +
        'Returns full match detail: red and blue alliance team lists, final scores by alliance and component ' +
        '(auto, teleop, endgame, fouls), ranking points awarded, win/tie outcome, the Statbotics pre-match ' +
        'win probability and predicted score, and elimination flag. ' +
        'Match keys follow the format `<event-key>_<match-code>`, e.g. "2024flor_qm20" (qualification match 20), ' +
        '"2024flor_sf2m1" (semifinal 2 match 1), "2024flor_f1m3" (finals match 3). ' +
        'Use this to answer "who won 2024flor_qm20?", "what was the predicted vs actual score?", or to get ' +
        'alliance compositions for a known match. ' +
        'For browsing many matches, use get_matches.',
      annotations: {
        title: 'Get FRC Match Details (Single Match)',
        ...readOnlyAnnotations,
      },
      inputSchema: toMCPSchema(GetMatchInputSchema),
    },
  • Zod schema for the 'get_match' input: expects a single 'match' field (a string matching MatchKeySchema, e.g. '2024flor_qm20').
    export const GetMatchInputSchema = z.object({
      match: MatchKeySchema,
    });
  • Helper function 'makeApiRequest' used by the handler to call the Statbotics REST API.
    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 readOnly and idempotent, so no contradiction. The description adds behavioral context by listing returned fields, match key format, and the Statbotics data, which is valuable beyond annotations.

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?

Four short sentences, front-loaded with purpose, then output summary, then usage guidance, then sibling alternative. Every sentence adds value with no redundancy.

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?

Despite no output schema, the description thoroughly lists all return values. Combined with annotations and a well-documented single parameter, the definition is fully complete for an agent.

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?

Parameter schema already describes the match key, but description adds detailed format and examples (e.g., '2024flor_qm20') that enhance understanding beyond the schema.

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?

Description clearly states the tool looks up a single FRC match by match key and returns full match detail. It explicitly distinguishes itself from the sibling tool get_matches which is for browsing many matches.

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?

Provides explicit usage examples and states when to use this tool versus get_matches. Gives concrete queries like 'who won 2024flor_qm20?' to guide the agent.

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