get_league_team_standings
Retrieve NBA team standings for a specific season and season type using the NBA MCP Server. Input the season in 'YYYY-YY' format and specify the season type (e.g., 'Regular Season') to access accurate standings data.
Instructions
Get league team standings for a given season and season type.
Args: season: str The season in the format 'YYYY-YY'. season_type: str The type of season. Pattern: "Regular Season", "Pre Season"
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| season | Yes | ||
| season_type | Yes |
Implementation Reference
- server.py:118-136 (handler)The handler function for the 'get_league_team_standings' tool, decorated with @mcp.tool for registration. It fetches league standings using nba_api's leaguestandingsv3.LeagueStandingsV3 endpoint.@mcp.tool def get_league_team_standings(season: str, season_type: str) -> dict: """ Get league team standings for a given season and season type. Args: season: str The season in the format 'YYYY-YY'. season_type: str The type of season. Pattern: "Regular Season", "Pre Season" """ try: standings = leaguestandingsv3.LeagueStandingsV3(league_id="00", season=season, season_type=season_type) return standings.get_dict() except Exception as e: return {"error": str(e)}