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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

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

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

No annotations are provided, so the description carries full burden for behavioral disclosure. While 'Get' implies a read operation, it doesn't specify whether this requires authentication, has rate limits, returns paginated results, or what happens if the player_id is invalid. For a tool with zero annotation coverage, this leaves significant behavioral gaps.

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 concise with two sentences: one stating the purpose and another explaining the parameter. The Args section is structured but could be more integrated. There's no wasted text, though it could be slightly more polished.

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 the tool's simplicity (one parameter) and the presence of an output schema (which handles return values), the description is minimally adequate. However, with no annotations and incomplete behavioral context, it doesn't fully prepare the agent for potential edge cases or usage constraints.

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

Parameters3/5

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

The description adds minimal parameter semantics beyond the schema. It explains that player_id is 'The id of the player', which slightly clarifies the schema's 'Player Id' title. However, with 0% schema description coverage and only one parameter, this meets the baseline expectation without providing format examples or validation rules.

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 verb ('Get') and resource ('career stats for a player'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_player_game_log' or 'get_player_awards', which also retrieve player-related data but for different scopes (game-level vs career-level).

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 like 'get_player_game_log' (for per-game stats) or 'get_player_awards' (for awards data), leaving the agent to infer usage context based on tool names alone.

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