Skip to main content
Glama
argotdev

NHL MCP Server

by argotdev

get_team_stats

Retrieve comprehensive NHL team statistics including roster details, season performance metrics, and individual player data for analysis and comparison.

Instructions

Get detailed statistics for a specific NHL team including roster, season performance, and player stats.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
teamAbbrevYesTeam abbreviation (e.g., TOR, NYR, BOS, MTL)
seasonNoSeason in format YYYYYYYY (e.g., 20242025), defaults to current season

Implementation Reference

  • Handler for the 'get_team_stats' tool in the CallToolRequestSchema switch statement. Extracts parameters and calls client.getTeamStats(), returning JSON-formatted stats.
    case 'get_team_stats': { const stats = await client.getTeamStats( parameters.teamAbbrev as string, parameters.season as string | undefined ); return { content: [{ type: 'text', text: JSON.stringify(stats, null, 2) }], }; }
  • src/index.ts:70-87 (registration)
    Registration of the 'get_team_stats' tool in the TOOLS array used for ListToolsRequestSchema response.
    { name: 'get_team_stats', description: 'Get detailed statistics for a specific NHL team including roster, season performance, and player stats.', inputSchema: { type: 'object', properties: { teamAbbrev: { type: 'string', description: 'Team abbreviation (e.g., TOR, NYR, BOS, MTL)', }, season: { type: 'string', description: 'Season in format YYYYYYYY (e.g., 20242025), defaults to current season', }, }, required: ['teamAbbrev'], }, },
  • Input schema definition for the get_team_stats tool, specifying required teamAbbrev and optional season.
    inputSchema: { type: 'object', properties: { teamAbbrev: { type: 'string', description: 'Team abbreviation (e.g., TOR, NYR, BOS, MTL)', }, season: { type: 'string', description: 'Season in format YYYYYYYY (e.g., 20242025), defaults to current season', }, }, required: ['teamAbbrev'], },
  • Helper function in NHLAPI class that fetches team statistics from the NHL API endpoint.
    async getTeamStats(teamAbbrev: string, season?: string): Promise<any> { const seasonStr = season || this.getCurrentSeason(); return this.fetchJSON(`${NHL_API_BASE}/club-stats/${teamAbbrev}/${seasonStr}/2`); }

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