Skip to main content
Glama
alex-rimerman

Statcast MCP Server

outfield_directional_oaa

Analyze outfielders' defensive performance by direction to identify where they gain or lose value compared to league average, using MLB Statcast data.

Instructions

Outfielders' Outs Above Average broken out by direction (back/in, left/right).

Shows where outfielders add or lose value relative to average.

Args: year: Season year (e.g. 2024). min_opportunities: Minimum opportunities, or "q" for qualified (default). player_name: Optional. Filter to one outfielder.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
yearYes
min_opportunitiesNoq
player_nameNo

Implementation Reference

  • The implementation of the outfield_directional_oaa tool handler in the MCP server. It wraps the pybaseball function.
    @mcp.tool()
    def outfield_directional_oaa(
        year: int,
        min_opportunities: str | int = "q",
        player_name: str | None = None,
    ) -> str:
        """Outfielders' Outs Above Average broken out by direction (back/in, left/right).
    
        Shows where outfielders add or lose value relative to average.
    
        Args:
            year: Season year (e.g. 2024).
            min_opportunities: Minimum opportunities, or "q" for qualified (default).
            player_name: Optional. Filter to one outfielder.
        """
        from pybaseball import statcast_outfield_directional_oaa as _fn
    
        try:
            data = _fn(year, min_opp=min_opportunities)
        except Exception as e:
            return f"Error fetching directional OAA: {e}"
    
        if player_name:
            try:
                data = _filter_player_rows(data, player_name)
            except ValueError as e:
                return str(e)
            if data.empty:
                return (

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