Skip to main content
Glama

MLB player season stats and bio from the official MLB Stats

sports_mlb_stats
Read-only

MLB player season stats (hitting or pitching) and bio from the official MLB Stats API (statsapi.mlb.com). Input is the MLB person id; season stats only, no game feed. Free public data, MLB copyright applies. Related tools on this server, for a different need: sports_mlb_statsapi when you need MLB games for one date from the official MLB Stats API; sports_nba_stats when you need NBA player season statistics, sorted leaderboard: per. Price: $0.002 per successful call, paid with x402 (USDC on Base, Solana and 10 more networks); failed calls are not charged.

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": {
      "playerId": "<playerId>"
    },
    "name": "sports_mlb_stats"
  }
}

Input Schema

NameRequiredDescriptionDefault
groupNohitting (default) or pitching
seasonNoSeason year YYYY (default: 2025)
playerIdYesMLB person id, e.g. 660271 (Shohei Ohtani)

Output Schema

NameRequiredDescriptionDefault
teamNo
groupNo
statsNo
playerNo
seasonNo
sourceNo
checkedAtNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only declare readOnlyHint and openWorldHint; the description adds substantive behavior — data source is the official MLB Stats API, data is free/public with MLB copyright, and calls cost $0.002 per success via x402 USDC payment on Base/Solana with failures uncharged. That billing and payment-rail detail is exactly the context annotations cannot convey and materially affects whether an agent should call it.

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?

Core identity, scope limits and alternative routing are front-loaded in the first two sentences, with pricing last. The pricing/network enumeration and the sibling listing are somewhat sprawling, and the fragment "sorted leaderboard: per" reads as truncated noise, but nothing is seriously out of order.

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?

An output schema exists, so return-value explanation is not required, and annotations plus description cover safety and cost. The remaining weakness is that hitting vs. pitching behavior and the bio coverage are only implied; the garbled NBA clause also slightly reduces confidence in the stated boundaries.

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%, covering playerId, group (hitting/pitching) and season (YYYY, default 2025), so the schema already does the parameter work. The description only restates that input is an MLB person id and that results are season-scoped, adding little semantic detail such as valid id ranges or season bounds. 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?

States a specific verb and resource — "MLB player season stats (hitting or pitching) and bio from the official MLB Stats API" — plus the required input (MLB person id) and an explicit scope limit ("season stats only, no game feed"). It also names the sibling that serves a different need, so an agent can distinguish it without opening schemas.

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

Usage Guidelines5/5

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

Explicitly routes the agent: use sports_mlb_statsapi for MLB games on one date, sports_nba_stats for NBA season stat leaderboards, and this tool for MLB player season stats. The "season stats only, no game feed" exclusion makes the when-not condition concrete rather than inferable.

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.

Resources