Skip to main content
Glama
stevenyuser

NBA MCP Server

by stevenyuser

get_team_game_log

Retrieve detailed game logs for NBA teams by specifying team ID, season, and season type to analyze performance across regular season, playoffs, or other periods.

Instructions

Get game log for a team by their ID, season, and season type.

Args: team_id: str The id of the team. season: str The season in the format 'YYYY-YY'. season_type: str The type of season. Pattern: "Regular Season", "Pre Season", "Playoffs", "All Star"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
team_idYes
seasonYes
season_typeYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function decorated with @mcp.tool, implementing the get_team_game_log tool. It uses the nba_api to fetch team game log data for a given team ID, season, and season type, returning the data as a dictionary or an error message.
    @mcp.tool
    def get_team_game_log(team_id: str, season: str, season_type: str) -> dict:
        """
        Get game log for a team by their ID, season, and season type.
        
        Args:
          team_id: str
            The id of the team.
          season: str
            The season in the format 'YYYY-YY'.
          season_type: str
            The type of season. Pattern: "Regular Season", "Pre Season", "Playoffs", "All Star"
        """
        try:
            log = teamgamelog.TeamGameLog(team_id=team_id, 
                                          season=season, 
                                          season_type_all_star=season_type)
            return log.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 the full burden. It states what data is retrieved but doesn't disclose behavioral traits like pagination, rate limits, authentication needs, error handling, or what the output contains. For a data retrieval tool with no annotations, this is a significant gap.

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 with a clear purpose statement followed by parameter details. The Args section is structured but could be more integrated; however, every sentence adds value without redundancy.

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 3 parameters with no schema descriptions and an output schema exists, the description adequately covers parameter semantics but lacks behavioral context. For a retrieval tool with no annotations, it should mention output format or limitations, but the output schema mitigates some completeness needs.

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 crucial semantic context beyond the schema, which has 0% coverage. It explains that team_id is 'the id of the team', season uses format 'YYYY-YY', and season_type includes specific patterns like 'Regular Season'. This compensates well for the schema's lack of descriptions.

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

Purpose5/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 the resource 'game log for a team', specifying it retrieves data based on team ID, season, and season type. It distinguishes from siblings like get_team_details (general info) and get_player_game_log (player-specific) by focusing on team game logs.

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?

The description implies usage when needing a team's game log with specific season parameters, but doesn't explicitly state when to use this tool vs. alternatives like get_team_year_by_year_stats or get_live_game_boxscore. No exclusions or prerequisites are 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