allocate
Split an amount in proportion to weights so the parts add up to the total to the cent, using largest-remainder rounding. Use it to divide costs, fees, or discounts across lines.
Instructions
Split an amount in proportion to weights so that the parts add up to the amount to the cent (largest-remainder rounding). Use it for splitting costs, fees or discounts across lines.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"amount": "<amount>",
"weights": "<weights>"
},
"name": "allocate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | ||
| weights | Yes | ||
| decimals | No |