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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

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",
        ]
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden. It discloses return content (win-loss records, winning percentage, games back) and structure (organized by 6 divisions). However, it omits safety traits (read-only status), rate limits, or error behaviors like invalid season handling.

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?

Excellent structure with front-loaded purpose ('Get MLB division standings...'), followed by return value details, then parameter documentation. Zero redundant text; every sentence delivers distinct value regarding scope, output format, or parameter usage.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter tool with existing output schema, the description is appropriately complete. It covers the undocumented parameter, clarifies the specific output metrics, and establishes clear scope without unnecessary verbosity.

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?

Schema description coverage is 0%, requiring the description to compensate. The Args section successfully documents the season parameter with type context ('year') and concrete example ('2024'), fully compensating for the bare schema. Minor deduction for lacking validation constraints (e.g., valid year ranges).

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 uses specific verb 'Get' with clear resource 'MLB division standings' and scope 'for a given season'. It effectively distinguishes from sibling tools like team_season_batting_stats by emphasizing win-loss records and divisional organization rather than performance statistics.

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 by specifying it returns division standings and win-loss records, contrasting with player stat tools. However, it lacks explicit guidance on when to use this versus similar team-level tools like team_season_batting_stats or when standings data is available (e.g., in-season vs offseason).

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

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