Preview a Peruvian invoice (Facturin)
facturin_preview_invoiceBuild a free preview of a Peruvian electronic invoice with IGV (18% VAT) correctly calculated. Nothing is sent to SUNAT; this is a draft to show the user what the document will contain.
`items`: list of {"description": str, "quantity": number, "unit_price": number}.
`document_type`: "boleta" (receipt for consumers) or "factura" (invoice for companies; requires `customer_ruc`).
`prices_include_igv`: true if unit prices already include IGV (usual for boletas). `currency`: "PEN" or "USD".
To issue it for real, valid before SUNAT with PDF, XML and CDR, the user creates a Facturin account.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": {
"items": "<items>"
},
"name": "facturin_preview_invoice"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | ||
| currency | No | PEN | |
| customer_ruc | No | ||
| document_type | No | boleta | |
| prices_include_igv | No |