Skip to main content
Glama

get_mlb_linescore

Retrieve detailed inning-by-inning scoring data for MLB games using game IDs to analyze game progress and outcomes.

Instructions

Get linescore for a specific game by game_id.

Args: game_id (int): The game ID.

Returns: dict: Linescore information.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
game_idYes

Implementation Reference

  • The core handler function for the 'get_mlb_linescore' tool, decorated with @mcp.tool() which registers it as an MCP tool. It retrieves the linescore data for a given MLB game ID using the MLB API.
    @mcp.tool() def get_mlb_linescore(game_id: int) -> dict: """ Get linescore for a specific game by game_id. Args: game_id (int): The game ID. Returns: dict: Linescore information. """ try: linescore = mlb.get_game_line_score(game_id) return linescore 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/guillochon/mlb-api-mcp'

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