Add an expense
add_expenseUse this to record an expense. amountCents is in minor units of currency (¥1,000 is 1000, $12.50 is 1250). paidByParticipantToken is who paid; splits lists who shares it. For an even split use splitType equal and omit amountCents from the splits. Take participant tokens from get_group or search, and default the date to today.
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": {
"groupToken": "<groupToken>",
"description": "<description>",
"amountCents": "<amountCents>",
"currency": "<currency>",
"splitType": "<splitType>",
"date": "<date>",
"paidByParticipantToken": "<paidByParticipantToken>",
"splits": "<splits>"
},
"name": "add_expense"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | The day it was paid, `YYYY-MM-DD`. | |
| splits | Yes | Who shares the expense. For `equal`, list the members and omit `amountCents`: the server divides the total, odd cents to the first members in the group's order. For `amount`, `percentage` and `shares`, give each member's `amountCents`; they must add up to the total (exactly for `amount`, otherwise within 1 per member). | |
| currency | Yes | The currency it was paid in. One other than the group's is converted into the group currency at the rate on `date`. | |
| splitType | Yes | How the total is divided. `equal` divides it for you; for any other type each split carries its own `amountCents`. | |
| timeOfDay | No | Time of day, `HH:MM` (24-hour). Omit for the time it is recorded, in Japan time. | |
| groupToken | Yes | The group's token, from `listGroups` or `listSearchResults`. | |
| amountCents | Yes | The total in minor units of `currency` (¥1,000 is 1000, $12.50 is 1250). | |
| description | Yes | What the expense was for, as the group will see it. | |
| categoryToken | No | The group category to file it under, by token from `showGroup`. Omit for none. | |
| idempotencyKey | No | A UUID you make up for this call. If the call fails or gets no answer and you try again, send the same UUID so nothing is added twice. Use a new one for each new thing you add. | |
| balanceCurrency | No | Currency bucket used for balances. Omit to use the group currency; send the transaction currency to keep this transaction in a separate original-currency balance bucket. | |
| paidByParticipantToken | Yes | The member who paid, by token from `showGroup`. |