Skip to main content
Glama
Backspace-me

SportScore

get_top_scorers

Retrieve top scorers or assist leaders for any competition in football, basketball, cricket, or tennis. Provide sport and competition slug to view ranked player stats.

Instructions

Get the top scorers (or top assisters) for a competition. Useful for 'who's leading the Premier League scoring charts?'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sportYesSport to query. One of football, basketball, cricket, tennis.
slugYesCompetition slug.
limitNo
statNogoals

Implementation Reference

  • src/index.js:114-135 (registration)
    The 'get_top_scorers' tool is registered as the 5th entry in the TOOLS array (lines 114-135). It defines the tool name, description, input schema (sport, slug, limit, stat), API path (/api/widget/topscorers/), and a paramMap that converts user args to API query parameters.
    {
      name: "get_top_scorers",
      description:
        "Get the top scorers (or top assisters) for a competition. Useful for 'who's leading the Premier League scoring charts?'.",
      inputSchema: {
        type: "object",
        properties: {
          sport: sportSchema,
          slug: { type: "string", description: "Competition slug." },
          limit: { type: "integer", minimum: 1, maximum: 50, default: 20 },
          stat: { type: "string", enum: ["goals", "assists"], default: "goals" },
        },
        required: ["sport", "slug"],
      },
      path: "/api/widget/topscorers/",
      paramMap: (args) => ({
        sport: args.sport,
        slug: args.slug,
        limit: args.limit ?? 20,
        stat: args.stat ?? "goals",
      }),
    },
  • The input schema for get_top_scorers requires 'sport' (string enum: football/basketball/cricket/tennis) and 'slug' (competition slug string), with optional 'limit' (integer 1-50, default 20) and 'stat' (enum 'goals'/'assists', default 'goals').
    inputSchema: {
      type: "object",
      properties: {
        sport: sportSchema,
        slug: { type: "string", description: "Competition slug." },
        limit: { type: "integer", minimum: 1, maximum: 50, default: 20 },
        stat: { type: "string", enum: ["goals", "assists"], default: "goals" },
      },
      required: ["sport", "slug"],
    },
  • The handler is a generic CallToolRequestSchema handler (lines 228-270) that looks up the tool by name in TOOL_BY_NAME, calls paramMap(args) to build query params, invokes callApi() with the tool's path/params, and returns the JSON response wrapped with attribution.
    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,
      };
    });
  • src/index.js:183-183 (registration)
    The TOOL_BY_NAME Map is built from the TOOLS array and is used by the handler to look up tool configs by name at runtime.
    const TOOL_BY_NAME = new Map(TOOLS.map((t) => [t.name, t]));
Behavior2/5

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

No annotations are provided, and the description does not disclose any behavioral traits such as ordering, pagination, auth requirements, or side effects. It only states the basic function.

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 two sentences long with no unnecessary words, directly stating purpose and a usage example.

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?

For a tool with 4 parameters and no output schema, the description lacks details on result format, ordering, and parameter constraints. It is adequate for a simple query but not fully comprehensive.

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

Parameters4/5

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

The description adds value by mentioning 'top assisters', which hints at the 'stat' parameter. However, it does not explain the 'slug' or 'limit' parameters beyond what the schema provides.

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 returns top scorers or top assisters for a competition, with a concrete example ('Premier League scoring charts'). It distinguishes from siblings like get_standings 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 Guidelines4/5

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

The description provides a clear use case example but does not specify when not to use it or mention alternative tools for similar queries.

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