Generate an invoice or quote PDF
generate_invoiceBuild an invoice or quote PDF from company and client details, line items with quantities and rates, a tax rate, and an optional percent or flat discount. All money is computed in integer cents, so there are no float rounding errors. Returns the PDF as base64 plus the total.
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": "generate_invoice"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| invoice | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Invoice or quote PDF as base64. | |
| bytes | Yes | PDF size in bytes. | |
| currency | Yes | ISO currency code used for the invoice. | |
| totalCents | Yes | Grand total in integer cents. |