Skip to main content
Glama
stevenyuser

NBA MCP Server

by stevenyuser

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
NameRequiredDescriptionDefault
team_idYes

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)}

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