Create an expense draft from a receipt
create_draft_expenseUse this when the user shares a receipt or supplier invoice, or asks to record an expense or purchase. Saves an expense draft from a purchase receipt or supplier invoice for the user to review in Fatura Go ("Review in Fatura Go"); no expense is recorded until they save it there. Pass the fields you read from the receipt. VAT follows the app: only the VAT printed on the receipt, or 5/105 of the total when the receipt says prices include 5% VAT; otherwise no VAT and a "VAT not shown" warning. Returns the stored draft(s), warnings in plain words and the review link. A supplier with the same TRN or exactly the same name is linked; similar names are returned to choose from; no supplier is created. An open draft with the same supplier and invoice number is returned instead of a second one. Do not use it for sales invoices (create_draft_invoice) or to pay a supplier bill.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "create_draft_expense"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | YYYY-MM-DD, the receipt date. Default today (UAE). | |
| total | No | The grand total printed on the receipt, VAT included. Required with the receipt fields. | |
| category | No | Expense category slug, e.g. fuel, meals, office_supplies, software. Default other. | |
| currency | No | One of AED, SAR, USD, EUR, GBP, KWD, QAR, BHD, OMR, INR. Default the business currency. | |
| supplier | No | The seller's name as printed. | |
| reference | No | An order or PO number printed apart from the invoice number. | |
| net_amount | No | The total before VAT, only when printed. | |
| vat_amount | No | The VAT amount ONLY when a VAT line is printed. Leave it out when none is printed; never calculate it. | |
| business_id | No | From list_businesses. May be left out when the connection shares exactly one business. | |
| supplier_id | No | A supplier of the business, from the candidates a previous call returned. | |
| new_supplier | No | true when the user says the supplier is new although similar names exist. Nothing is created now; Fatura Go adds the supplier when the expense is saved. | |
| supplier_trn | No | The SELLER's 15-digit TRN as printed (never the buyer's). Checked as check_trn does. | |
| idempotency_key | No | Optional. A unique string (for example a UUID) for this request: a retry with the same key returns the first result instead of writing again. | |
| vat_included_stated | No | true ONLY when the receipt explicitly says the prices include 5% VAT (e.g. "Inclusive of 5% VAT"). A TRN alone is not such a statement. | |
| supplier_invoice_number | No | The invoice or receipt number as printed. |