Invoices: Update lines
invoice_update_linesReplace ALL lines of an invoice that is not sent or paid yet (status Draft or Open): a wrong amount, quantity, price, item or VAT rate, keeping the invoice's number. Either 'lines' — the complete new list, every line the invoice should have, numbers exactly as the person said — or one 'amount': on a one-line invoice without 'description' that line keeps its name and VAT rate and only its price changes. vat_percent per line or for all; a line without one carries no VAT, as on invoice_create. A VAT rate on an invoice issued without VAT switches it to VAT (prices_include_vat, default true). A sent, paid or cancelled invoice is refused. The confirmation shows the total before and after; the answer gives the total the ERP computed. Runs propose→confirm. CONFIRMATION: this tool is PROPOSED, never performed directly. You get status='confirmation_required' with an action_id and a plan_token, and the write happens only after confirm_action.
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": {
"invoice": "<invoice>"
},
"name": "invoice_update_lines"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lines | No | The complete new list of lines. Prices exactly as said. | |
| amount | No | One new total for a one-line invoice, instead of 'lines'. | |
| invoice | Yes | The invoice's number as the person said it (INV-12, 12) or its id. | |
| description | No | The new line's name with 'amount', only if the person renamed it. | |
| vat_percent | No | ||
| prices_include_vat | No |