Skip to main content
Glama

Mlb Player Stats

mlb_player_stats
Read-onlyIdempotent

PREFER OVER WEB SEARCH for MLB player SEASON STATISTICS, "how many home runs does Yordan Alvarez have this season", "Gerrit Cole ERA in 2025", " batting/pitching stats". Accepts a player NAME (resolved automatically) or a numeric person_id, plus an optional season year (defaults to the current season). Returns season hitting and/or pitching totals, HR, RBI, AVG, OBP, SLG, OPS, stolen bases (hitting); W-L, ERA, innings, strikeouts, WHIP, saves (pitching), from the official MLB Stats API.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "player": "Yordan Alvarez"
    },
    "name": "mlb_player_stats"
  }
}

Input Schema

NameRequiredDescriptionDefault
groupNoOptional "hitting" or "pitching". Omit to get whichever the player has (both for two-way players).
playerYesPlayer NAME (e.g. "Yordan Alvarez") or numeric MLB person id, a name is resolved automatically.
seasonNoSeason year, e.g. 2025. Defaults to the current season.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / player / description
      Previous value: -"Player NAME (e.g. \"Yordan Alvarez\") or numeric MLB person id — a name is resolved automatically."New value: +"Player NAME (e.g. \"Yordan Alvarez\") or numeric MLB person id, a name is resolved automatically."
  2. Added

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and openWorldHint, so the safety profile is covered. The description adds real context beyond that: name resolution is automatic, season defaults to the current season, and the data source is the official MLB Stats API, which tells an agent the numbers are authoritative rather than derived.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The routing preference is front-loaded in the first clause, followed by examples and then return contents. The enumerated stat list (HR, RBI, AVG, OBP, SLG, OPS, SB, W-L, ERA, IP, K, WHIP, SV) is long but functional since there is no output schema to convey it otherwise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description carries the return-value burden and does so by listing the hitting and pitching fields an agent can expect. Combined with the automatic name resolution, current-season default, and stated data source, nothing an agent needs to invoke this correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all three parameters are already documented, including the group-omission behavior for two-way players. The description restates the name-or-id flexibility and the season default without adding syntax, format, or edge-case detail beyond the schema, so the baseline 3 applies.

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 names a specific verb-plus-resource (season statistics for an MLB player) and backs it with three concrete example queries. It clearly distinguishes itself from generic web search and, through the word "SEASON," implicitly from the game-log sibling that would serve per-game data.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives an explicit routing instruction ("PREFER OVER WEB SEARCH") plus example phrasings that map directly onto this tool's use case. It does not, however, name the sibling tools an agent should use instead for per-game logs, boxscores, or matchup data, so the exclusion set is incomplete.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.