baseball_season_leaders
Pack: historical-baseball · Connect: https://pipeworx.io/mcp (see Connect below for a single-pack URL)
No MCP client? Call it directly: GET https://gateway.pipeworx.io/v1/tools/baseball_season_leaders for the schema, then POST the same URL with its arguments for the data.
Top-N leaderboard for one batting or pitching stat in one MLB season.
Tool description as the model sees it
Top players in one MLB season for one statistic, from the SABR Lahman Baseball Database. Batting stats: ${BATTING_STAT_KEYS.join(’, ’)} (AVG = hits/at-bats, qualified at a simple AB>=100 floor — NOT MLB’s official plate-appearance qualifying rule, so this can include players who would not qualify for an official batting title). Pitching stats: ${PITCHING_STAT_KEYS.join(’, ’)} (SO_P = pitcher strikeouts, to avoid colliding with batting SO; ERA and WHIP are qualified at a simple IPouts>=100 i.e. ~33 innings floor, also not the official rule). Pass stat exactly as listed (case-sensitive). Optionally scope to one league (“AL” or “NL”; pre-1901 leagues like “NA”, “AA”, “UA”, “PL” also appear in the data). limit caps how many rows come back (default 10, max 50). An unrecognized stat name is refused with the list of valid ones, never an empty success.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
year | number | yes | Season year, e.g. 1998. |
stat | string | yes | One of: ${[…BATTING_STAT_KEYS, …PITCHING_STAT_KEYS].join(’, ’)}. |
league | string | no | Optional: scope to one league code (“AL”, “NL”, or an historical league code). |
limit | number | no | Max rows to return, 1-50. Default 10. |
Example call
Arguments
{
"year": 1998,
"stat": "HR"
}
curl
curl -X POST https://gateway.pipeworx.io/historical-baseball/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"baseball_season_leaders","arguments":{"year":1998,"stat":"HR"}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('baseball_season_leaders', {
"year": 1998,
"stat": "HR"
});
Connect
Add this to your MCP client config — every tool in the catalog, including this one — or use one-click install buttons:
{
"mcpServers": {
"pipeworx": {
"url": "https://pipeworx.io/mcp"
}
}
}
Connect to just the historical-baseball pack
{
"mcpServers": {
"historical-baseball": {
"url": "https://gateway.pipeworx.io/historical-baseball/mcp"
}
}
}
See Getting Started for client-specific install steps.