Cancel issued invoice
cancel_invoiceCancel only issued invoices never delivered to the customer; they remain in the ledger and number series but no longer count toward income, VAT, or overviews.
Instructions
Cancel (storno) an issued invoice: it stays in the ledger and in the number series, but no longer counts towards income, VAT or overviews. Use ONLY when the user explicitly cancels it and it was never delivered to the customer; if it was already delivered, do not cancel — issue a credit note with issue_credit_note.
Destructive: overwrites the invoice's status (also a paid one) in ~/.ucetka/invoices/.json; no tool restores it. Repeating sets the same state (a new reason replaces the old). The PDF file is kept. Re-runs the issued-invoice import afterwards. Fails for unknown numbers. Confirm with the user first.
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": {
"number": "<number>",
"reason": "<reason>"
},
"name": "cancel_invoice"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| number | Yes | Number of the issued invoice to cancel, e.g. '2610001'. | |
| reason | Yes | Why it is cancelled, stored in the ledger, e.g. 'chybná, nahrazena fakturou 2609001'. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |