Spray chart
get_spray_chartUse for where a batter or team hits the ball: balls in play by trajectory (ground ball, line drive, fly ball, pop-up) and by field (left, center, right), with hit rates; include_balls adds each ball's location for drawing. Counts the regular season and postseason together unless season_type says otherwise (get_player's batting line is the regular season alone). Costs 10 credits.
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_spray_chart"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| team | No | ||
| season | No | Season (a year; default: the latest; ignored with game_id). | |
| batter_id | No | ||
| season_type | No | regular, postseason, or all (default): which games' balls in play to count. | |
| include_balls | No | Add each ball in play's x/y (up to 3,000). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| balls | No | ||
| season | Yes | ||
| by_field | Yes | ||
| balls_note | No | ||
| balls_in_play | Yes | ||
| by_trajectory | Yes |