statcast_pitcher_arsenal_stats
Analyze pitcher performance by pitch type with batting average, slugging, whiff rate, and run values to evaluate effectiveness of specific pitches.
Instructions
Get performance stats broken down by pitch type for each pitcher.
Shows batting average, slugging, whiff rate, put-away rate, and run values for every individual pitch type a pitcher throws.
Args: year: Season year (e.g. 2024). min_plate_appearances: Minimum PA for each pitch type (default 25). player_name: Optional. Filter to one pitcher (all their pitch types).
Great for evaluating which specific pitches are most (or least) effective.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| year | Yes | ||
| min_plate_appearances | No | ||
| player_name | No |
Implementation Reference
- src/statcast_mcp/server.py:1059-1095 (handler)The handler function `statcast_pitcher_arsenal_stats` is defined in `src/statcast_mcp/server.py`. It uses the `pybaseball` library to fetch data and applies filtering if a player name is provided.
def statcast_pitcher_arsenal_stats( year: int, min_plate_appearances: int = 25, player_name: str | None = None, ) -> str: """Get performance stats broken down by pitch type for each pitcher. Shows batting average, slugging, whiff rate, put-away rate, and run values for every individual pitch type a pitcher throws. Args: year: Season year (e.g. 2024). min_plate_appearances: Minimum PA for each pitch type (default 25). player_name: Optional. Filter to one pitcher (all their pitch types). Great for evaluating which specific pitches are most (or least) effective. """ from pybaseball import statcast_pitcher_arsenal_stats as _fn try: data = _fn(year, minPA=min_plate_appearances) except Exception as e: return f"Error fetching arsenal stats: {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 pitcher arsenal stats for {player_name} in {year} at " f"{min_plate_appearances}+ PA per pitch type." ) return _fmt(data, max_rows=50)