Skip to main content
Glama
argotdev

NHL MCP Server

by argotdev

get_standings

Retrieve current NHL standings with team statistics like wins, losses, points, and goal differential. Filter results by division or conference to focus on specific league segments.

Instructions

Get current NHL standings including wins, losses, points, goals for/against, and goal differential. Can filter by division or conference.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateNoDate in YYYY-MM-DD format (optional, defaults to current standings)
divisionNoFilter by division (Atlantic, Metropolitan, Central, Pacific)
conferenceNoFilter by conference (Eastern, Western)

Implementation Reference

  • MCP tool handler for 'get_standings': calls NHLAPIClient.getStandings with optional date, filters by division or conference parameters, formats using formatStandings, returns formatted text.
    case 'get_standings': {
      const standings = await client.getStandings(parameters.date as string | undefined);
      let filtered = standings.standings || [];
    
      if (parameters.division) {
        filtered = filtered.filter(
          (t) => t.divisionAbbrev.toLowerCase() === (parameters.division as string).toLowerCase()
        );
      }
    
      if (parameters.conference) {
        filtered = filtered.filter(
          (t) =>
            t.conferenceAbbrev.toLowerCase() === (parameters.conference as string).toLowerCase()
        );
      }
    
      const formatted = formatStandings(filtered);
      return {
        content: [{ type: 'text', text: formatted }],
      };
    }
  • Input schema and metadata for the 'get_standings' tool, defining optional parameters: date, division, conference.
    {
      name: 'get_standings',
      description: 'Get current NHL standings including wins, losses, points, goals for/against, and goal differential. Can filter by division or conference.',
      inputSchema: {
        type: 'object',
        properties: {
          date: {
            type: 'string',
            description: 'Date in YYYY-MM-DD format (optional, defaults to current standings)',
          },
          division: {
            type: 'string',
            description: 'Filter by division (Atlantic, Metropolitan, Central, Pacific)',
          },
          conference: {
            type: 'string',
            description: 'Filter by conference (Eastern, Western)',
          },
        },
      },
    },
  • src/index.ts:460-462 (registration)
    Registration of all tools list via ListToolsRequestHandler, which returns the TOOLS array including 'get_standings'.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return { tools: TOOLS };
    });
  • formatStandings helper function formats TeamStandings array into a markdown table string used by the handler.
    function formatStandings(standings: TeamStandings[]): string {
      let result = 'Team | GP | W | L | OT | PTS | GF | GA | DIFF | Div\n';
      result += '-'.repeat(70) + '\n';
    
      standings.forEach((team) => {
        const teamName = team.teamAbbrev.default.padEnd(4);
        const gp = team.gamesPlayed.toString().padStart(3);
        const w = team.wins.toString().padStart(2);
        const l = team.losses.toString().padStart(2);
        const ot = team.otLosses.toString().padStart(2);
        const pts = team.points.toString().padStart(3);
        const gf = team.goalFor.toString().padStart(3);
        const ga = team.goalAgainst.toString().padStart(3);
        const diff = team.goalDifferential.toString().padStart(4);
        const div = team.divisionAbbrev;
    
        result += `${teamName} | ${gp} | ${w} | ${l} | ${ot} | ${pts} | ${gf} | ${ga} | ${diff} | ${div}\n`;
      });
    
      return result;
    }
  • NHLAPIClient.getStandings implementation: fetches current standings data from NHL API endpoint for given date (defaults to today).
    async getStandings(date?: string): Promise<{ standings: TeamStandings[] }> {
      const dateStr = date || new Date().toISOString().split('T')[0];
      return this.fetchJSON(`${NHL_API_BASE}/standings/${dateStr}`);
    }
Behavior3/5

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

With no annotations provided, the description carries the full burden. It describes what data is returned (standings with specific metrics) and filtering options, but doesn't disclose behavioral traits like whether this is a read-only operation (implied by 'Get'), rate limits, authentication requirements, or how 'current' is determined (real-time vs. cached). The description doesn't contradict any annotations since none exist.

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 efficiently structured in two sentences: the first states the core purpose and data returned, the second adds filtering capabilities. Every word earns its place with no redundancy or unnecessary elaboration, making it easy to parse quickly.

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?

Given the tool's moderate complexity (3 optional parameters, no output schema, no annotations), the description is adequate but has gaps. It covers what data is returned and filtering options, but doesn't explain the return format (e.g., structured list of teams), how standings are ordered, or what happens when multiple filters are combined. For a data retrieval tool with no output schema, more detail about the response structure would be helpful.

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 description coverage is 100%, so the schema already fully documents all three parameters (date, division, conference) with their types, formats, and options. The description adds minimal value beyond the schema by mentioning filtering capabilities but doesn't provide additional semantic context like parameter interactions or default behaviors beyond what's in the schema 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 the verb ('Get') and resource ('current NHL standings') with specific data fields included (wins, losses, points, goals for/against, goal differential). It distinguishes from siblings like get_game_details or get_player_stats by focusing specifically on standings rather than game details, player stats, or other team metrics.

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 clear context for when to use this tool ('Get current NHL standings') and mentions filtering capabilities by division or conference. However, it doesn't explicitly state when NOT to use it or name specific alternatives among the sibling tools (e.g., when to use get_team_stats instead for different metrics).

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/argotdev/nhl-mcp-ts'

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