Skip to main content
Glama
stevenyuser

NBA MCP Server

by stevenyuser

get_player_awards

Retrieve NBA player awards by providing their unique identifier. This tool accesses the NBA database to return recognition and honors for specific basketball players.

Instructions

Get awards 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:27-40 (handler)
    The main handler function for the 'get_player_awards' tool. It is decorated with @mcp.tool for registration. Takes a player_id, fetches awards using nba_api.stats.endpoints.playerawards.PlayerAwards, and returns the data as dict or error.
    @mcp.tool
    def get_player_awards(player_id: str) -> dict:
        """
        Get awards for a player by their ID.
    
        Args:
          player_id: str
            The id of the player.
        """
        try:
          awards = playerawards.PlayerAwards(player_id=player_id)
          return awards.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