baseball_player_history
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_player_history for the schema, then POST the same URL with its arguments for the data.
Career year-by-year batting/pitching lines for one MLB player.
Tool description as the model sees it
Year-by-year MLB batting and/or pitching statistics for one player’s whole career, from the SABR Lahman Baseball Database (1871-2025). Pass a player NAME (“Babe Ruth”, “Walter Johnson”) or an exact Lahman player_id (e.g. “ruthba01”) — a name is resolved by exact then fuzzy match; if more than one player matches, a list of candidates (with player_id, birth year, debut) is returned instead of a guess, so the caller can re-ask with the exact player_id. Returns every season the player appears in Batting.csv and/or Pitching.csv (most players have only one; a few, like Babe Ruth, have both). Each season row has team, league, games and the standard counting stats. Unknown or ambiguous names are refused with a clear error/candidate-list, never an empty success.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
player | string | yes | Player name (“Hank Aaron”) or exact Lahman player_id (“aaronha01”). |
Example call
Arguments
{
"player": "Babe Ruth"
}
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_player_history","arguments":{"player":"Babe Ruth"}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('baseball_player_history', {
"player": "Babe Ruth"
});
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.