Remove expense record
remove_expenseDelete a recorded expense from the ledger when a received invoice should not be kept or must be replaced. Removes its stored JSON by expense ID and re-runs the import check.
Instructions
Delete a received invoice (expense) record from the ledger — only when the user explicitly deleted the document or does not want it recorded (e.g. list_import_issues reports its PDF as missing), or to replace a wrong add_expense entry.
Destructive: deletes ~/.ucetka/expenses/<expense_id>.json with no undo; the PDF itself is not touched. It then re-runs the received-invoice import, so if the PDF is still in the received folder it is imported or flagged again right away. Fails if the ID does not exist. Confirm with the user first. Returns what was removed.
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": {
"expense_id": "<expense_id>"
},
"name": "remove_expense"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expense_id | Yes | ID of the recorded expense = its PDF name without extension, e.g. '2603002'. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |