Skip to main content
Glama
Backspace-me

SportScore

get_tracker

Retrieve live tracker data including player positions and animation frames for a football match using its numeric ID.

Instructions

Get live match tracker data (position, animation frames) for a match by numeric id. Usually only useful for football.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sportYesSport to query. One of football, basketball, cricket, tennis.
idYesNumeric match id from the upstream provider.

Implementation Reference

  • src/index.js:166-180 (registration)
    Tool registration: the 'get_tracker' tool is defined in the TOOLS array with its name, description, inputSchema (sport + id), API path (/api/widget/tracker/), and paramMap function that maps args to query params.
    {
      name: "get_tracker",
      description:
        "Get live match tracker data (position, animation frames) for a match by numeric id. Usually only useful for football.",
      inputSchema: {
        type: "object",
        properties: {
          sport: sportSchema,
          id: { type: "string", description: "Numeric match id from the upstream provider." },
        },
        required: ["sport", "id"],
      },
      path: "/api/widget/tracker/",
      paramMap: (args) => ({ sport: args.sport, id: args.id }),
    },
  • Shared sport schema used in get_tracker's inputSchema, validating sport must be one of: football, basketball, cricket, tennis.
    const sportSchema = {
      type: "string",
      enum: SPORTS,
      description: "Sport to query. One of football, basketball, cricket, tennis.",
    };
  • src/index.js:183-183 (registration)
    A Map keyed by tool name that provides O(1) lookup of tool definitions from the TOOLS array. Used in the CallToolRequestSchema handler to find the get_tracker definition at runtime.
    const TOOL_BY_NAME = new Map(TOOLS.map((t) => [t.name, t]));
  • Generic tool handler that processes all tools including get_tracker. It looks up the tool by name from TOOL_BY_NAME, validates the sport arg, calls the API via callApi() using the tool's path and paramMap, and returns JSON response with attribution. No custom per-tool logic — all tools share this same handler.
    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,
      };
    });
  • Generic API fetch helper used by get_tracker and all other tools. Builds URL from API_BASE + path, appends query params, fetches with JSON headers, returns status/url/body.
    async function callApi(path, params) {
      const url = new URL(API_BASE + path);
      for (const [k, v] of Object.entries(params)) {
        if (v !== undefined && v !== null && v !== "") url.searchParams.set(k, String(v));
      }
      const res = await fetch(url, {
        headers: { "Accept": "application/json", "User-Agent": UA },
      });
      const text = await res.text();
      let body;
      try {
        body = JSON.parse(text);
      } catch {
        body = { raw: text, _parse_error: "response was not valid JSON" };
      }
      return { status: res.status, url: url.toString(), body };
    }
Behavior2/5

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

No annotations provided, so description carries full burden. Mentions 'live' data and 'tracker data' but does not disclose read-only nature, side effects, authentication requirements, or data update frequency.

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?

Single sentence, 18 words, with essential information front-loaded. No unnecessary words.

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

Completeness3/5

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

No output schema, so description should compensate. It mentions output type (position, animation frames) but lacks details on format or structure. Adequate for a simple tool but could be more 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 covers 100% of parameters with descriptions and types. Description adds no additional parameter meaning, justifying baseline score of 3.

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

Purpose4/5

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

Clearly states it retrieves live match tracker data (position, animation frames) for a match by numeric id. Mentions it's usually only useful for football, but doesn't differentiate from siblings like get_match_detail or get_player.

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

Usage Guidelines3/5

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

Implies usage scope by stating 'usually only useful for football', but provides no explicit guidance on when to use this tool versus alternatives, nor any exclusions for other sports.

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/Backspace-me/sportscore-mcp'

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