Skip to main content
Glama
alex-rimerman

Statcast MCP Server

sprint_speed_leaderboard

Retrieve MLB player sprint speed rankings from Statcast data to analyze baserunning performance and identify top speed athletes by season.

Instructions

Get the Statcast sprint speed leaderboard.

Returns each player's sprint speed in feet per second, measured on competitive running plays. Sprint speed is one of the best measures of raw speed and baserunning ability.

Args: year: Season year (e.g. 2024). min_opportunities: Minimum competitive run opportunities (default 10). player_name: Optional. Filter to one player (e.g. 'Ronald Acuna Jr.').

Great for finding the fastest players in baseball.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
yearYes
min_opportunitiesNo
player_nameNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function 'sprint_speed_leaderboard' which fetches sprint speed data using the pybaseball library and handles filtering and formatting.
    def sprint_speed_leaderboard(
        year: int,
        min_opportunities: int = 10,
        player_name: str | None = None,
    ) -> str:
        """Get the Statcast sprint speed leaderboard.
    
        Returns each player's sprint speed in feet per second, measured on
        competitive running plays. Sprint speed is one of the best measures
        of raw speed and baserunning ability.
    
        Args:
            year: Season year (e.g. 2024).
            min_opportunities: Minimum competitive run opportunities (default 10).
            player_name: Optional. Filter to one player (e.g. 'Ronald Acuna Jr.').
    
        Great for finding the fastest players in baseball.
        """
        from pybaseball import statcast_sprint_speed as _fn
    
        try:
            data = _fn(year, min_opp=min_opportunities)
        except Exception as e:
            return f"Error fetching sprint speed data: {e}"
    
        if player_name:
            try:
                data = _filter_player_rows(data, player_name)
            except ValueError as e:
                return str(e)
            if data.empty:
                return (
                    f"No sprint speed row for {player_name} in {year} at "
                    f"{min_opportunities}+ opportunities."
                )
    
        return _fmt(data, max_rows=50)
Behavior4/5

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

With no annotations provided, the description carries the full burden. It successfully discloses behavioral traits by explaining the measurement methodology ('measured on competitive running plays') and units ('feet per second'). It lacks operational details like error handling for invalid years or whether results are paginated, but covers the essential domain-specific context.

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

Conciseness4/5

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

The description is appropriately sized with clear front-loading of the core purpose. The structure separates the tool description, technical methodology, parameter documentation, and use case. The Args section efficiently documents parameters without verbosity, though the final sentence ('Great for finding...') slightly overlaps with the opening purpose statement.

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?

Given the tool has an output schema (per context signals) and is a straightforward read operation with only 3 parameters, the description is complete. It explains what data is returned (sprint speed in feet per second) and fully documents all parameters, compensating for the schema's lack of descriptions. No critical gaps remain for an AI agent to invoke this tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/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 fully compensate. It excels by documenting all three parameters in the 'Args:' section: year includes an example (2024), min_opportunities notes the default value (10), and player_name marks it as Optional with a realistic example ('Ronald Acuna Jr.').

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 opens with 'Get the Statcast sprint speed leaderboard' - a specific verb and resource. It distinguishes itself from the many sibling batting/pitching tools by focusing explicitly on 'raw speed and baserunning ability' rather than hitting or pitching metrics.

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 with 'Great for finding the fastest players in baseball,' indicating when the tool is appropriate. However, it lacks explicit guidance on when to use this versus other statcast tools (like statcast_batter) or exclusions (e.g., that this is not for pitching speed).

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