Skip to main content
Glama
stevenyuser

NBA MCP Server

by stevenyuser

get_team_details

Retrieve comprehensive NBA team information including championships, awards, background, and history by providing a team ID.

Instructions

Get details for a team by their ID. Details include championship awards, conference awards, division awards, background, history, and more.

Args: team_id: str The id of the team.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
team_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • server.py:66-80 (handler)
    The main handler function for the 'get_team_details' tool. It is decorated with @mcp.tool, which registers it as an MCP tool. The function fetches team details using the nba_api library, handling errors gracefully.
    @mcp.tool
    def get_team_details(team_id: str) -> dict:
        """
        Get details for a team by their ID.
        Details include championship awards, conference awards, division awards, background, history, and more.
    
        Args:
          team_id: str
            The id of the team.
        """
        try:
            details = teamdetails.TeamDetails(team_id=team_id)
            return details.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?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states this is a read operation ('Get details'), but doesn't mention potential limitations like rate limits, authentication requirements, or error handling. The description adds some context about what details are included, but lacks critical behavioral traits for a tool with no annotation coverage.

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 followed by a parameter explanation. The first sentence states the core purpose, the second provides helpful examples, and the Args section adds necessary parameter context without redundancy. It's front-loaded with the most important information.

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

Completeness4/5

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

Given the tool has an output schema (which handles return values), a single parameter with good semantic coverage in the description, and no complex behavioral requirements beyond basic read operations, the description is reasonably complete. It could benefit from more behavioral context given the lack of annotations, but covers the essential purpose and parameter meaning adequately.

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 provides clear semantic meaning for the single parameter ('team_id: The id of the team'), which is valuable since schema description coverage is 0%. This compensates well for the lack of schema descriptions, though it doesn't specify format constraints or provide examples of valid team IDs.

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 action ('Get details') and resource ('team by their ID'), with specific examples of included information like championship awards and background. It distinguishes this from sibling tools that focus on standings, game logs, or player data rather than comprehensive team details.

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

Usage Guidelines3/5

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

Usage is implied by the description's focus on retrieving comprehensive team details, suggesting it's for when detailed team information is needed. However, there's no explicit guidance on when to use this versus alternatives like get_team_year_by_year_stats or get_team_game_log, nor any prerequisites or exclusions mentioned.

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