batting_average
Calculates a baseball player's batting average by dividing hits by at-bats. Returns the result rounded to the specified precision (default 3 decimal places). (cost: 1 credit)
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": "batting_average"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| num_hits | No | integer, required, number of hits | |
| precision | No | integer, optional, decimal places to round to, default 3 | |
| num_at_bats | No | integer, required, number of at-bats |