Skip to main content
Glama
alex-rimerman

Statcast MCP Server

statcast_pitcher_pitch_arsenal

Analyze pitch arsenals for MLB pitchers by retrieving velocity and frequency data per pitch type across seasons or for specific players.

Instructions

Get pitch arsenal breakdown for all pitchers in a season.

Shows average velocity (and related columns) per pitch type for qualifying pitchers.

Args: year: Season year (e.g. 2024). min_pitches: Minimum total pitches thrown to qualify (default 100). player_name: Optional. Filter to one pitcher (e.g. 'Spencer Strider').

Great for understanding what pitches a pitcher throws and how often.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
yearYes
min_pitchesNo
player_nameNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The `statcast_pitcher_pitch_arsenal` function, decorated as an MCP tool, fetches season-long pitch arsenal data for pitchers using `pybaseball.statcast_pitcher_pitch_arsenal` and optionally filters by player name.
    @mcp.tool()
    def statcast_pitcher_pitch_arsenal(
        year: int,
        min_pitches: int = 100,
        player_name: str | None = None,
    ) -> str:
        """Get pitch arsenal breakdown for all pitchers in a season.
    
        Shows average velocity (and related columns) per pitch type for qualifying pitchers.
    
        Args:
            year: Season year (e.g. 2024).
            min_pitches: Minimum total pitches thrown to qualify (default 100).
            player_name: Optional. Filter to one pitcher (e.g. 'Spencer Strider').
    
        Great for understanding what pitches a pitcher throws and how often.
        """
        from pybaseball import statcast_pitcher_pitch_arsenal as _fn
    
        try:
            data = _fn(year, minP=min_pitches)
        except Exception as e:
            return f"Error fetching pitch arsenal 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 pitch-arsenal row for {player_name} in {year} at "
                    f"{min_pitches}+ pitches thrown."
                )
    
        return _fmt(data, max_rows=50)
Behavior3/5

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

No annotations provided, so description carries full burden. Adds valuable context about output ('average velocity and related columns') and filtering logic ('qualifying pitchers'), but omits details about data freshness, pagination, or error handling.

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?

Well-structured with clear sections: purpose, data details, parameters, and use case. The inline 'Args:' format is slightly informal but efficiently packs necessary parameter documentation without redundancy.

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

Completeness4/5

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

Adequately complete given the existence of an output schema. Covers the main functional scope, parameter requirements, and typical use case. Could briefly mention whether it returns aggregated season data or individual pitch data.

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 has 0% description coverage, but the description fully compensates by documenting all 3 parameters with semantic meaning, examples ('2024', 'Spencer Strider'), and default values (min_pitches: 100, player_name: optional).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clear verb ('Get') and resource ('pitch arsenal breakdown') with scope ('all pitchers in a season'). Distinguishes from batter tools implicitly by mentioning pitchers, but does not explicitly differentiate from similar sibling 'statcast_pitcher_arsenal_stats'.

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?

Provides implied usage context ('Great for understanding what pitches a pitcher throws and how often') but lacks explicit when-to-use guidance or comparison to alternatives like 'statcast_pitcher' or 'statcast_pitcher_arsenal_stats'.

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