Edit an expense
expense_updateEdit an existing shared flat expense's description, category, total, splits, or receipt image; only the payer can make changes and stale edits are rejected.
Instructions
Edits an existing expense: description, category, total amount, splits or receipt image. Only the payer may edit (otherwise not_payer). To remove an expense, use expense_delete. Send only the fields to change. A new amountCents needs the complete replacement splits in the same call (splits_required_with_amount), and the currency cannot be changed. Splits that stay the same keep their settled state. Pass expectedUpdatedAt (updatedAt from expenses_list) to refuse a stale edit: 409 expense_changed means read again and decide. Side effects: members whose share changed get a push, and the chat notice is refreshed when description or amount changes. The answer holds the updated expense.
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": {
"id": "<id>"
},
"name": "expense_update"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Id of the expense to edit, from expenses_list. | |
| splits | No | Complete replacement list of debtor shares, summing to the (new) total. Omit to keep the current splits. | |
| wgCode | No | Share code of the flat (code from wg_list). Leave it out when the account belongs to one flat. | |
| category | No | New category. Omit to keep the current one. | |
| imageUrl | No | URL of a receipt image already uploaded to this flat in the ManaWG app. Omit to keep the current image. | |
| amountCents | No | New total in cents. Omit to keep the current total; when set, splits must be sent too. | |
| description | No | New title. Omit to keep the current one. | |
| expectedUpdatedAt | No | updatedAt of the expense as last read from expenses_list; guards against editing a stale version. |