Skip to main content
Glama

get_mlb_game_pace

Retrieve game pace statistics for a specific MLB season using season year and sport ID. Access key metrics to analyze gameplay duration and trends in baseball data.

Instructions

Get game pace statistics for a given season.

Args: season (int): Season year. sport_id (int): Sport ID (default: 1 for MLB).

Returns: dict: Game pace statistics.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seasonYes
sport_idNo

Implementation Reference

  • The handler function implementing the 'get_mlb_game_pace' tool logic. It is decorated with @mcp.tool(), which also handles registration in the MCP server. Calls mlb.get_gamepace to fetch game pace stats for the season.
    @mcp.tool() def get_mlb_game_pace(season: int, sport_id: int = 1) -> dict: """ Get game pace statistics for a given season. Args: season (int): Season year. sport_id (int): Sport ID (default: 1 for MLB). Returns: dict: Game pace statistics. """ try: gamepace = mlb.get_gamepace(str(season), sport_id=sport_id) return gamepace except Exception as e: return {"error": str(e)}
  • main.py:22-23 (registration)
    Call to setup_mlb_tools which defines and registers all MLB tools, including 'get_mlb_game_pace', on the MCP server instance.
    setup_mlb_tools(mcp) setup_generic_tools(mcp)

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