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
| Name | Required | Description | Default |
|---|---|---|---|
| gameId | Yes | The NHL game ID |
Implementation Reference
- src/index.ts:487-492 (handler)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) }], }; }
- src/index.ts:35-48 (schema)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'], }, },
- src/nhl-api.ts:124-126 (handler)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 }; });