Skip to main content
Glama
Backspace-me

SportScore

by Backspace-me

get_match_detail

Retrieve detailed match data including score, status, timeline, and lineups by providing the sport and match slug from SportScore results.

Instructions

Get detailed data for a single match by its slug (e.g. 'manchester-united-vs-liverpool'): score, status, timeline, lineups. Slugs come from get_matches results or match URLs on sportscore.com.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sportYesSport to query. One of football, basketball, cricket, tennis.
slugYesMatch slug, e.g. 'manchester-united-vs-liverpool'.

Implementation Reference

  • src/index.js:68-82 (registration)
    Tool registration definition in the TOOLS array: name 'get_match_detail', description, inputSchema (sport + slug), API path '/api/widget/match/', and paramMap that maps args to query params.
    {
      name: "get_match_detail",
      description:
        "Get detailed data for a single match by its slug (e.g. 'manchester-united-vs-liverpool'): score, status, timeline, lineups. Slugs come from get_matches results or match URLs on sportscore.com.",
      inputSchema: {
        type: "object",
        properties: {
          sport: sportSchema,
          slug: { type: "string", description: "Match slug, e.g. 'manchester-united-vs-liverpool'." },
        },
        required: ["sport", "slug"],
      },
      path: "/api/widget/match/",
      paramMap: (args) => ({ sport: args.sport, slug: args.slug }),
    },
  • The sportSchema enum validating the sport parameter (football, basketball, cricket, tennis) used by get_match_detail's input schema.
    const sportSchema = {
      type: "string",
      enum: SPORTS,
      description: "Sport to query. One of football, basketball, cricket, tennis.",
    };
  • Generic CallToolRequestSchema handler that dispatches all tools. When called with name 'get_match_detail', it resolves the tool definition from TOOL_BY_NAME, validates sport, calls paramMap to build query params, invokes callApi with the tool's path, and returns the JSON envelope.
    server.setRequestHandler(CallToolRequestSchema, async (req) => {
      const { name, arguments: rawArgs } = req.params;
      const tool = TOOL_BY_NAME.get(name);
      if (!tool) {
        return {
          isError: true,
          content: [{ type: "text", text: `Unknown tool: ${name}` }],
        };
      }
      const args = rawArgs ?? {};
      if (args.sport && !SPORTS.includes(args.sport)) {
        return {
          isError: true,
          content: [
            { type: "text", text: `Invalid sport '${args.sport}'. Must be one of: ${SPORTS.join(", ")}.` },
          ],
        };
      }
    
      const params = tool.paramMap(args);
      let result;
      try {
        result = await callApi(tool.path, params);
      } catch (err) {
        return {
          isError: true,
          content: [{ type: "text", text: `Network error calling SportScore API: ${err.message}` }],
        };
      }
    
      const envelope = {
        tool: name,
        request_url: result.url,
        http_status: result.status,
        data: result.body,
        ...attributionFooter(),
      };
    
      return {
        content: [{ type: "text", text: JSON.stringify(envelope, null, 2) }],
        isError: result.status >= 400,
      };
    });

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4/5.0
Behavior3/5

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

No annotations are provided, so the description must carry the full burden. It discloses the output fields but omits any behavioral traits such as idempotency, side effects, or authentication needs. For a read-only tool, this is adequate but not exceptional.

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?

Two sentences: the first states the core functionality and output fields, the second provides the source of the slug. No wasted words, front-loaded with key information.

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

Completeness4/5

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

Given no output schema, the description lists key fields returned (score, status, timeline, lineups). It does not mention optional fields or nesting, but for a single-match detail tool this is reasonably complete.

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

Parameters3/5

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

Schema coverage is 100% with clear schema descriptions. The description repeats the slug example without adding new semantic context beyond the schema, meeting the baseline for complete schema coverage.

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 the tool retrieves detailed data for a single match by slug, listing specific fields (score, status, timeline, lineups). It distinguishes from sibling `get_matches` which returns a list of matches.

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

Usage Guidelines4/5

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

The description provides guidance on where to obtain slugs (from `get_matches` or match URLs), implying it is a follow-up tool. It does not explicitly state when not to use it or compare to other siblings beyond `get_matches`.

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