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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

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
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool retrieves data ('Get'), implying a read-only operation, but doesn't cover aspects like rate limits, authentication needs, error handling, or response format. The description is minimal and lacks behavioral details beyond the basic function.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded, with the main purpose stated clearly in the first sentence. The parameter explanations are concise and directly relevant. There's no wasted text, though the structure could be slightly improved by integrating parameter details more seamlessly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given that an output schema exists, the description doesn't need to explain return values. However, with no annotations and a simple 2-parameter tool, the description is adequate but minimal. It covers the basic purpose and parameters but lacks context on usage, behavioral traits, or integration with siblings, leaving some gaps in completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds significant meaning beyond the input schema, which has 0% description coverage. It explains that 'season' is in 'YYYY-YY' format and 'season_type' follows a pattern like 'Regular Season' or 'Pre Season'. This compensates well for the schema's lack of descriptions, though it doesn't cover all potential values or edge cases.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get league team standings for a given season and season type.' It specifies the verb ('Get') and resource ('league team standings'), making the function unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'get_team_details' or 'get_team_year_by_year_stats', which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools or clarify scenarios where this tool is preferred over others like 'get_team_game_log' or 'get_today_scoreboard'. Usage is implied through the parameters but lacks explicit context or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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