Skip to main content
Glama
alex-rimerman

Statcast MCP Server

pitching_stats_date_range

Retrieve pitching statistics like ERA, WHIP, and strikeouts for specific date ranges in baseball, with optional filtering by pitcher name.

Instructions

Pitching stats aggregated over a custom date range (Baseball Reference).

Args: start_date: Start date YYYY-MM-DD (2008+). end_date: End date YYYY-MM-DD (inclusive). player_name: Optional. Filter to one pitcher.

Returns ERA, WHIP, K/9, IP, W-L, etc. for that span.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
start_dateYes
end_dateYes
player_nameNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The pitching_stats_date_range tool definition and implementation.
    def pitching_stats_date_range(
        start_date: str,
        end_date: str,
        player_name: str | None = None,
    ) -> str:
        """Pitching stats aggregated over a custom date range (Baseball Reference).
    
        Args:
            start_date: Start date YYYY-MM-DD (2008+).
            end_date: End date YYYY-MM-DD (inclusive).
            player_name: Optional. Filter to one pitcher.
    
        Returns ERA, WHIP, K/9, IP, W-L, etc. for that span.
        """
        from pybaseball import pitching_stats_range as _fn
    
        try:
            data = _fn(start_date, end_date)
        except Exception as e:
            return f"Error fetching pitching stats for date range: {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 pitching stats for {player_name} in {start_date}–{end_date}."
    
        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 of behavioral disclosure. It successfully identifies the data source (Baseball Reference), temporal constraints (2008+), date boundary behavior (inclusive), and sample return metrics (ERA, WHIP, K/9). It omits error handling behavior or rate limiting details, but covers the essential operational constraints.

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?

The description is optimally structured with a clear purpose statement followed by labeled Args and Returns sections. Every line provides essential information (data source, date formats, constraints, return examples) with zero redundancy or filler content.

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?

Given the tool has an output schema (reducing the need for detailed return value documentation in the description) and three simple parameters, the description is sufficiently complete. It provides the critical context of data provenance (Baseball Reference) and temporal coverage limits (2008+) that would be necessary for correct usage.

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?

The schema has 0% description coverage, but the description fully compensates by documenting all three parameters in the Args section: date formats (YYYY-MM-DD), the 2008+ constraint for start_date, the inclusive nature of end_date, and the optional filtering behavior of player_name. This is exemplary compensation for poor schema documentation.

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?

The description clearly states it retrieves 'Pitching stats aggregated over a custom date range' from 'Baseball Reference', providing specific verb, resource, and scope. It implicitly distinguishes from sibling tools like 'season_pitching_stats' via the 'custom date range' qualifier and from Statcast tools via the data source mention, though it could explicitly state when to prefer this over season-level alternatives.

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 through 'custom date range' (suggesting arbitrary periods vs. full seasons), but lacks explicit when-to-use guidance or comparisons to alternatives like 'season_pitching_stats' or 'statcast_pitcher'. It does not state prerequisites or when NOT to use the tool.

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