allocate
Split a sum into ratio-based parts that add up exactly, using largest-remainder. For commissions, installments, and tax apportionment.
Instructions
Split an amount by integer ratios without losing a minor unit (largest-remainder method). allocate("100.00", [1,1,1]) is ["33.34","33.33","33.33"]: the parts sum to EXACTLY the original. Use this for commission splits, installments, and tax apportionment instead of doing division yourself.
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>",
"ratios": "<ratios>"
},
"name": "allocate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | Decimal string in USD, e.g. "100.00" | |
| ratios | Yes | Integer weights, e.g. [50, 30, 20] |