Skip to main content
Glama

mlb_league_stats

Read-only

Fetch ranked MLB season-stat split rows for a group returned by mlb_discovery, filtered by season, game type, league, team, position, or date range. Use mlb_league_leaders for leaderboards or mlb_player_stats/mlb_team_stats for one entity.

Input Schema

NameRequiredDescriptionDefault
groupYesRequired. One of hitting, pitching, fielding, catching, running, game, team, streak.
limitNoOptional. Ranked results to return, 1-100. Defaults to 10.
offsetNoOptional. Zero-based result offset for ranked stats.
seasonNoOptional. Four-digit season; defaults to the current year.
team_idNoOptional numeric MLB team id from mlb_teams.
end_dateNoOptional. Date-range end for byDateRange stat types; must be paired with start_date.
positionNoOptional hitter position: C, 1B, 2B, 3B, SS, LF, CF, RF, DH, OF, or IF.
game_typeNoOptional. MLB game type code.
league_idNoOptional. MLB league id: 103 (American League) or 104 (National League).
stat_typeNoOptional. One of the stat types accepted by this endpoint; defaults to season.
start_dateNoOptional. Date-range start for byDateRange stat types; must be paired with end_date.
player_poolNoOptional qualified-player pool: QUALIFIED or ALL.
opponent_team_idNoOptional opposing team id; required by vsTeam stat types.
opponent_player_idNoOptional opposing player id; required by vsPlayer stat types.

Output Schema

NameRequiredDescriptionDefault
dataYesThe tool result payload (shape varies per tool; see each tool's docs resource).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is covered. The description adds that results are 'ranked' and grouped, but says nothing about pagination, auth, or result caps beyond what the schema and output schema already convey. Adequate, not rich, given the lower bar with annotations.

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?

Two sentences, zero filler, front-loaded with the core action and followed immediately by the disambiguation. Every clause earns its place.

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?

With an output schema present and full annotation coverage, the description needn't explain returns. It covers purpose, prerequisites (mlb_discovery), and alternatives, leaving only minor gaps such as how the 14 optional filters interact (stat_type-dependent params), which is arguably schema territory.

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 coverage is 100% with all 14 parameters individually documented, so the schema does the heavy lifting and baseline is 3. The description only summarizes filter dimensions (season, game type, league, team, position, date range) already spelled out in the schema, adding no syntax or interaction detail (e.g., stat_type gating date-range or opponent params).

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 (Fetch) and resource (ranked MLB season-stat split rows for a group), plus the origin of the required group (mlb_discovery). It explicitly distinguishes itself from mlb_league_leaders, mlb_player_stats, and mlb_team_stats, so an agent can route without opening sibling 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?

Names three concrete alternatives and the condition that selects each: leaderboards go to mlb_league_leaders, single-entity queries go to mlb_player_stats/mlb_team_stats. The 'group returned by mlb_discovery' phrase also tells the agent the upstream call needed first.

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.