Skip to main content
Glama
stevenyuser

NBA MCP Server

by stevenyuser

get_player_career_stats

Retrieve comprehensive career statistics for NBA players by entering their unique player ID to access detailed performance data.

Instructions

Get career stats for a player by their ID.

Args: player_id: str The id of the player.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
player_idYes

Implementation Reference

  • server.py:12-25 (handler)
    The handler function for the 'get_player_career_stats' tool. It is decorated with @mcp.tool, which registers it as an MCP tool. The function retrieves NBA player career statistics using the nba_api library based on the provided player_id.
    @mcp.tool def get_player_career_stats(player_id: str) -> dict: """ Get career stats for a player by their ID. Args: player_id: str The id of the player. """ try: stats = playercareerstats.PlayerCareerStats(player_id=player_id) return stats.get_dict() except Exception as e: return {"error": str(e)}

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/stevenyuser/nba_mcp'

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