add_document_entry
Add a line item to a customer invoice, vendor bill, employee voucher, or credit note, with quantity, price, tax, and notes. Unposted documents only—unpost first to amend posted ones.
Instructions
Add a line item to a customer invoice, vendor bill, employee voucher, or credit note.
Only unposted documents accept entries — unpost_document first to amend a posted one. Amounts are decimal strings; the line total is quantity × price (plus tax when a taxtable is attached).
Args: document_type: "invoice", "bill", "voucher", or "credit_note". id: Document ID (e.g., "000001"). account: Income account for invoices / credit notes; expense account for bills and vouchers. Full path, %short GUID, or full GUID. description: Line item description. quantity: Quantity as a decimal string (e.g., "3"). price: Unit price as a decimal string (e.g., "125.00"). party_type: Credit notes only — disambiguates when a customer and vendor credit note share an ID. taxtable: Tax table name to apply. Optional. tax_included: Whether price already includes tax. notes: Optional entry notes. action: Optional entry action label (e.g., "Hours").
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": {
"document_type": "<document_type>",
"id": "<id>",
"account": "<account>",
"description": "<description>",
"quantity": "<quantity>",
"price": "<price>"
},
"name": "add_document_entry"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| notes | No | Optional notes. Capped at 4096 characters at the MCP boundary; oversize input rejects with a clear error. | |
| price | Yes | ||
| action | No | ||
| account | Yes | ||
| quantity | Yes | ||
| taxtable | No | ||
| party_type | No | ||
| description | Yes | ||
| tax_included | No | ||
| document_type | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |