Skip to main content
Glama
MLB Stats MCP

MLB Stats MCP

by prnv-13

get_league_leaders

Read-onlyIdempotent

Retrieve MLB league leaders for a chosen statistic, season, league, and player group, with a configurable limit. Use it to compare top hitters or pitchers across AL, NL, or both leagues.

Instructions

Get the league leaders for a statistic.

Args:
    category: Stat category, e.g. homeRuns, battingAverage, runsBattedIn, stolenBases,
        onBasePlusSlugging, hits, earnedRunAverage, strikeouts, wins, saves, walksAndHitsPerInningPitched.
    season: Season year; defaults to the current one.
    group: "hitting" or "pitching". Needed for categories shared by both (e.g. strikeouts
        for pitchers vs. batters). Defaults to the API's choice.
    league: "AL", "NL" or "MLB" (both leagues).
    limit: How many leaders to return (1-50).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_league_leaders"
  }
}

Input Schema

NameRequiredDescriptionDefault
groupNo
limitNo
leagueNoMLB
seasonNo
categoryNohomeRuns

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already carry the read-only, idempotent, open-world profile, so the description's job is value-add — and it delivers: it discloses that season defaults to the current year, that group falls back to the API's own choice, and that limit is bounded 1-50 (a bound absent from the schema). An output schema exists, so not explaining return values is acceptable.

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 purpose sentence is front-loaded and each Args line maps to a real parameter with no filler. The raw docstring formatting and the long wrapped category list add mild visual noise but no genuinely wasted content.

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 five optional parameters, an output schema, and full annotations, the only thing an agent needs is what each parameter accepts and what the defaults are — all of which are covered. Ordering behavior is the sole minor omission and is not required to invoke the tool correctly.

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 all five parameters — and it does, giving concrete category names, the AL/NL/MLB vocabulary, the season default, and the limit range. It loses a point because the group parameter is described as only "hitting" or "pitching" while the schema enum also permits "fielding," leaving that value unexplained.

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?

"Get the league leaders for a statistic" states a specific verb and resource, and the scope (league-wide leaderboards rather than per-player logs) implicitly separates it from get_player_stats and get_standings. No sibling is named explicitly, so it stops short of a 5.

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?

Parameter-level guidance is strong — it explains why group matters for categories shared by hitters and pitchers — but there is no tool-level when-to-use/when-not guidance or pointer to get_player_stats for individual splits. Usage is implied rather than stated.

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