update_transaction
Correct an existing Money Lover transaction by changing its category, amount, note, or date; omitted fields stay unchanged.
Instructions
Correct an existing transaction: change its category, amount, note or date; fields left out keep their current value. Use it only when the user asked for the correction in their own words, after identifying the entry with list_transactions (which supplies the id, wallet and date). To remove an entry use delete_transaction; to record a new one use add_transaction. Use dry_run to preview the before/after while details are unsettled. Behavior: the transaction stays in its wallet; to move it to another wallet, delete it and add it again. Photo, location, event, people and the 'exclude from report' flag are kept as they are. Transfers, debts, loans and their repayments are refused because they are linked to other transactions; change those in the Money Lover app. The same limits as add_transaction apply: writes are off unless MONEYLOVER_ALLOW_WRITE=true, the wallet allowlist, maximum amount and hourly write limit, and both the current and the new date must be within roughly the last year to a month ahead. Repeating the same call changes nothing further. A failure reported as UNCERTAIN means the change may or may not have been saved: check list_transactions before retrying.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Id of the transaction, exactly as returned by list_transactions. | |
| date | Yes | The transaction's current date as YYYY-MM-DD, exactly as returned by list_transactions. Used to find it; to move it to another day use new_date. | |
| note | No | New note, replacing the old one entirely. Pass "" to clear it; omit to keep it. | |
| type | No | "income" or "expense". Only used with category, when that name exists as both. | |
| amount | No | New positive amount in the wallet's currency, e.g. 50000 or "12.50". Omit to keep the current amount. | |
| wallet | Yes | Name of the wallet the transaction is in, exactly as returned by list_transactions. | |
| dry_run | No | If true, find the transaction and validate the change, but do not save it. | |
| category | No | New category name as returned by list_categories for the transaction's wallet. Sub-categories may be written as "Parent > Child". Omit to keep the current category. | |
| new_date | No | New date as YYYY-MM-DD. Omit to keep the current date. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| after | Yes | The transaction as it is (or, for a dry run, would be) after this call. | |
| before | Yes | The transaction as it was before this call. | |
| dry_run | Yes | True when nothing was sent to Money Lover. | |
| updated | Yes | True only if the change was really saved. |