get_team_details
Retrieve comprehensive NBA team information, including championship history, awards, and background details, using the team ID. Ideal for accessing detailed data on any NBA team.
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
| Name | Required | Description | Default |
|---|---|---|---|
| team_id | Yes |
Implementation Reference
- server.py:66-80 (handler)The main handler function for the 'get_team_details' MCP tool. It is registered via the @mcp.tool decorator and implements the logic to fetch team details using the nba_api.stats.endpoints.teamdetails.TeamDetails endpoint.@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)}