bill-splitter
ChatGPTThis tool should be invoked when a user needs to divide a known total bill equally among a specific number of people and optionally account for how much each participant has already paid. It is intended for expense reconciliation use cases such as restaurant bills, shared travel costs, household expenses, or group purchases where the split is strictly equal rather than weighted. Provide the totalToPay as a numeric amount, the numberOfPeople as a positive integer, and optionally a people array containing names and amountPaid values aligned by index. The tool will normalize missing names, compute each person’s equal share at cent precision, allocate any remainder cents predictably, and determine net balances indicating who owes money and who should be reimbursed. The structured output includes per person shareAmount, amountPaid, netBalance, and status fields, enabling downstream systems or interfaces to render clear settlement information. Prefer this tool over free form arithmetic explanations when an interactive, inspectable breakdown is beneficial. Do not use it for uneven splits, percentage allocations, itemized tax distribution, or multi currency reconciliation. Because the computation is deterministic and side effect free, it is safe to call repeatedly with the same inputs. Always ensure monetary values are valid numbers and that the participant count matches the intended group size before invocation.





