Skip to main content
Glama
MLB Stats MCP

MLB Stats MCP

by prnv-13

get_player_stats

Read-onlyIdempotent

Retrieve a player's hitting, pitching, or fielding stats for a single season, career totals, or year-by-year breakdown. Provide the MLB player ID and choose the stat group and type.

Instructions

Get a player's batting, pitching or fielding stats.

Args:
    player_id: MLB player id from search_players.
    group: "hitting", "pitching" or "fielding".
    stat_type: "season" (one season), "career" (career totals) or "yearByYear" (every season).
    season: Season year for stat_type="season"; defaults to the current one.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "player_id": "<player_id>"
    },
    "name": "get_player_stats"
  }
}

Input Schema

NameRequiredDescriptionDefault
groupNohitting
seasonNo
player_idYes
stat_typeNoseason

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, openWorldHint, and idempotentHint. The description adds useful behavior around season defaulting to the current year and stat_type semantics, but it does not discuss pagination, error behavior, or rate limits; the output schema covers return shape.

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 first sentence front-loads the purpose, and the Args block is compact and easy to scan. The enum repetition is justified by zero schema description coverage and adds meaning rather than noise.

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?

For a four-parameter read-only stats tool with annotations and an output schema, the description covers the essentials needed to invoke it correctly. Its main omission is explicit routing guidance versus sibling tools such as get_player_game_log and get_player_info.

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?

Schema description coverage is 0%, so the description must carry parameter meaning. It documents the player_id source, group enum choices, stat_type meanings, and the season condition/default. It omits explicit defaults for group and stat_type, but those are present in the schema.

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 states a specific verb and resource: 'Get a player's batting, pitching or fielding stats.' This distinguishes it from generic player info and game-log tools, though it does not explicitly contrast with get_player_game_log or get_player_info.

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?

It tells the agent to obtain player_id from search_players and explains how stat_type choices map to season, career, or yearByYear. However, it does not state when to prefer this tool over get_player_game_log or get_player_info, nor does it give exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.