Skip to main content
Glama
guillochon

mlb-api-mcp

get_mlb_game_highlights

Retrieve MLB game highlights by providing a game ID to access key moments and plays from specific baseball games.

Instructions

Get game highlights for a specific game by game_id.

Args: game_id (int): The game ID.

Returns: dict: Game highlights.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
game_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function decorated with @mcp.tool(), which implements the tool logic by fetching highlights from the MLB API using mlb.get_game(game_id).content.highlights.
    @mcp.tool()
    def get_mlb_game_highlights(game_id: int) -> dict:
        """
        Get game highlights for a specific game by game_id.
    
        Args:
            game_id (int): The game ID.
    
        Returns:
            dict: Game highlights.
        """
        try:
            highlights = mlb.get_game(game_id).content.highlights
            return highlights
        except Exception as e:
            return {"error": str(e)}
  • main.py:22-22 (registration)
    The call to setup_mlb_tools(mcp) in the main server file, which defines and registers all MLB tools including get_mlb_game_highlights via decorators.
    setup_mlb_tools(mcp)
  • mlb_api.py:221-225 (registration)
    The setup_mlb_tools function where all MLB tools, including get_mlb_game_highlights, are defined and registered using @mcp.tool() decorators.
    def setup_mlb_tools(mcp):
        """Setup MLB tools for the MCP server"""
    
        @mcp.tool()
        def get_mlb_standings(
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 the tool retrieves highlights but does not disclose behavioral traits such as rate limits, authentication needs, data format (e.g., video URLs, text summaries), or error handling. The description is minimal and lacks essential context for safe and effective use.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded: the first sentence clearly states the purpose, followed by structured Args and Returns sections. Every sentence earns its place without redundancy, making it efficient and easy to parse.

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 moderate complexity (single parameter, no annotations, but with an output schema), the description is partially complete. It covers the basic purpose and parameter but lacks details on usage context, behavioral traits, and parameter semantics. The output schema exists, so the description need not explain return values, but overall gaps remain.

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 meaning beyond the input schema. It specifies that game_id is an integer for identifying a game, which aligns with the schema. However, with 0% schema description coverage, the description does not compensate by explaining where to find game_id values or their format (e.g., MLB game IDs). The baseline is 3 due to the single parameter being straightforward.

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 tool's purpose: 'Get game highlights for a specific game by game_id.' It specifies the verb ('Get'), resource ('game highlights'), and key identifier ('game_id'). However, it does not explicitly differentiate from siblings like get_mlb_game_scoring_plays or get_mlb_boxscore, which might provide overlapping or related game data.

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 mentions 'game highlights' but does not clarify what constitutes highlights (e.g., video clips, key moments) or how it differs from other game-related tools like get_mlb_game_scoring_plays. No exclusions or prerequisites are stated.

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/guillochon/mlb-api-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server