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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

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 (
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It explains the metric's meaning ('add or lose value relative to average') but omits operational details such as data freshness, rate limits, or safety characteristics (though the query nature implies read-only behavior).

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 two concise sentences front-loading the tool's purpose, followed by a clear Args section. No redundant information; every element serves a specific function in explaining the tool's scope or parameters.

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?

Appropriate for the tool's complexity (3 simple parameters, no nested objects). The presence of an output schema means return values don't need description. The description adequately covers the domain-specific inputs, though mentioning the data source or year availability range would strengthen completeness.

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?

Given 0% schema description coverage, the description effectively compensates by documenting all three parameters: it provides an example for 'year' (2024), explains the magic string 'q' for qualified in 'min_opportunities', and clarifies that 'player_name' filters to a single outfielder. Could further clarify what constitutes an 'opportunity'.

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 clearly defines the resource as 'Outfielders' Outs Above Average' with specific directional breakdowns (back/in, left/right), distinguishing it from the sibling tool 'outs_above_average' which lacks directional granularity. Uses specific verbs 'broken out by' and 'shows' to define the action.

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?

While the description implies usage scenarios through the emphasis on directional breakdowns, it lacks explicit guidance on when to select this tool versus the general 'outs_above_average' sibling or other fielding statistics. No prerequisites or exclusions are mentioned.

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