Skip to main content
Glama
stevenyuser

NBA MCP Server

by stevenyuser

get_league_team_standings

Retrieve NBA team standings for specific seasons and season types to track team performance and rankings.

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
NameRequiredDescriptionDefault
seasonYes
season_typeYes

Implementation Reference

  • The handler function that implements the 'get_league_team_standings' tool logic. It uses the nba_api library to fetch league standings for a specified season and season type, handling errors gracefully.
    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)}
  • server.py:118-118 (registration)
    The @mcp.tool decorator registers the get_league_team_standings function as an MCP tool.
    @mcp.tool

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