Skip to main content
Glama
alex-rimerman

Statcast MCP Server

team_standings

Retrieve MLB division standings for any season to view win-loss records, winning percentages, and games back for all 30 teams organized by division.

Instructions

Get MLB division standings for a given season.

Returns win-loss records, winning percentage, and games back for all 30 teams organised by division (AL East, AL Central, AL West, NL East, NL Central, NL West).

Args: season: The season year (e.g. 2024).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seasonYes

Implementation Reference

  • The handler implementation for the 'team_standings' MCP tool, which fetches standings using pybaseball.
    @mcp.tool()
    def team_standings(season: int) -> str:
        """Get MLB division standings for a given season.
    
        Returns win-loss records, winning percentage, and games back
        for all 30 teams organised by division (AL East, AL Central, AL West,
        NL East, NL Central, NL West).
    
        Args:
            season: The season year (e.g. 2024).
        """
        from pybaseball import standings
    
        try:
            tables = standings(season)
        except Exception as e:
            return f"Error fetching standings: {e}"
    
        if not tables:
            return "No standings data found."
    
        division_names = [
            "AL East",
            "AL Central",
            "AL West",
            "NL East",
            "NL Central",
            "NL West",
        ]

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/alex-rimerman/statcast-mcp'

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