Add, change or remove a invoice line
dolibarr_invoice_lineAdd, update, or delete lines on a draft Dolibarr invoice, using a product id or free-text description with quantity and unit price.
Instructions
Edits the lines of a draft invoice. add: qty and product_id (or a description and unit_price for a free-text line). update: line_id and the fields to change. delete: line_id.
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_id": "<invoice_id>",
"action": "<action>"
},
"name": "dolibarr_invoice_line"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| qty | No | Quantity. | |
| action | Yes | ||
| line_id | No | Needed for update and delete. | |
| vat_rate | No | VAT rate in percent. Leave out for the product's default rate (0 on a free-text line). | |
| invoice_id | Yes | ||
| product_id | No | Product or service id. Leave out for a free-text line. | |
| unit_price | No | Unit price before tax. Leave out on a product line to use the product's price. | |
| description | No | Line text. Required for a free-text line. | |
| free_line_kind | No | Only for a free-text line (no product_id): whether it is a service or goods. | service |
| discount_percent | No |