Record received invoice (expense)
add_expenseRecord a received invoice (expense) manually when import cannot read the document. Writes the entry with base and VAT, then re-runs the import to clear the matching issue.
Instructions
Record a received invoice (expense) by hand, mainly documents the import could not read (see list_import_issues). Returns a one-line confirmation with base, VAT and whether it is input VAT or reverse-charge self-assessment.
Side effects: writes ~/.ucetka/expenses/<expense_id>.json, then re-runs the received-invoice import so the matching issue disappears. No network. Not idempotent: if expense_id already exists it fails and changes nothing — use remove_expense first to replace a wrong entry. Validation fails on inconsistent reverse-charge, goods or claim_date combinations. Single VAT rate per call. For issued invoices use add_manual_invoice; to mark an existing expense paid use mark_expense_paid.
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>",
"supplier_name": "<supplier_name>",
"document_number": "<document_number>",
"tax_point_date": "<tax_point_date>",
"base": "<base>"
},
"name": "add_expense"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vat | No | VAT amount in CZK exactly as on the document. Omitted = base × vat_rate / 100 rounded to 0.01. Under reverse_charge it is the self-assessed VAT. | |
| base | Yes | Tax base (amount without VAT) in CZK, e.g. 1000.00. Convert foreign currency first. | |
| note | No | Free-text note, shown as the subject in the income/expense book. | |
| goods | No | Only with reverse_charge: True = goods acquired from the EU (VAT return line 3), False = service (default). | |
| pdf_path | No | Absolute path to the document PDF, as shown by list_import_issues; links the record to the file and clears the issue. Omitted = record without a file. | |
| vat_rate | No | VAT rate in percent: 21 (default), 12 or 0. Use 0 for documents without deductible VAT. | 21 |
| paid_date | No | Payment date YYYY-MM-DD if already paid. With actual-expense bookkeeping an expense counts only once paid. Omitted = unpaid (set later with mark_expense_paid). | |
| claim_date | No | YYYY-MM-DD; set only when a domestic document arrived after the DUZP period was already filed — the VAT deduction is then claimed in this date's period (§ 73). Not before DUZP, not with reverse_charge. Omitted = DUZP period. | |
| expense_id | Yes | Expense ID = PDF file name without extension (e.g. '2603002' for 2603002.pdf); letters, digits, '-' or '_'. Must not exist yet. | |
| supplier_dic | No | Supplier's DIČ / VAT ID, e.g. 'CZ12345678' or 'IE3668997OH'. Needed for EU suppliers in the control statement. | |
| supplier_name | Yes | Supplier's name as on the invoice, e.g. 'Alza.cz a.s.'. | |
| business_share | No | Business-use share in percent, 1–100 (phone half private = 50). Default 100. | |
| reverse_charge | No | True for a foreign supplier charging no Czech VAT (e.g. Google, cloud/AI services): VAT is self-assessed on both output and input. Requires a non-CZ supplier_country; not combinable with claim_date. Default False. | |
| tax_deductible | No | True (default) = deductible for income tax. For a non-deductible document (e.g. hospitality) pass False and vat_rate 0 so no VAT is deducted. | |
| tax_point_date | Yes | DUZP (tax point date) YYYY-MM-DD from the invoice; decides the VAT period. Also stored as issue date. | |
| document_number | Yes | The supplier's own invoice number, e.g. 'FV-2026-0042'. | |
| supplier_country | No | ISO alpha-2 country of the supplier's REGISTERED SEAT, e.g. 'IE', 'PL', 'US'; required for reverse_charge. Take it from the address on the invoice, not from the DIČ prefix (a US company with an Irish VAT ID is 'US'). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |