Skip to main content
Glama
argotdev

NHL MCP Server

by argotdev

get_game_details

Retrieve comprehensive NHL game information including play-by-play data, scoring plays, and period summaries by providing a specific game ID.

Instructions

Get detailed information about a specific game including play-by-play data, scoring plays, and period summaries.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
gameIdYesThe NHL game ID

Implementation Reference

  • MCP tool handler case that parses parameters, calls NHLAPIClient.getGameDetails(gameId), and returns JSON stringified response.
    case 'get_game_details': {
      const details = await client.getGameDetails(parameters.gameId as number);
      return {
        content: [{ type: 'text', text: JSON.stringify(details, null, 2) }],
      };
    }
  • Tool definition including name, description, and input schema requiring 'gameId' as number.
    {
      name: 'get_game_details',
      description: 'Get detailed information about a specific game including play-by-play data, scoring plays, and period summaries.',
      inputSchema: {
        type: 'object',
        properties: {
          gameId: {
            type: 'number',
            description: 'The NHL game ID',
          },
        },
        required: ['gameId'],
      },
    },
  • Core tool implementation: fetches detailed game play-by-play data from NHL API.
    async getGameDetails(gameId: number): Promise<any> {
      return this.fetchJSON(`${NHL_API_BASE}/gamecenter/${gameId}/play-by-play`);
    }
  • src/index.ts:460-462 (registration)
    Registers the list tools handler which returns the TOOLS array containing get_game_details.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return { tools: 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