Create an invoice
create_invoiceGenerates a print-ready A4 invoice as an HTML file, calculating totals and sales tax and saving it to a chosen path or the default Invoices folder.
Instructions
Creates a professional, print-ready A4 invoice as an HTML file (open it in a browser and choose Print > Save as PDF). It becomes a "Sales Tax Invoice" when tax is charged and the seller has an NTN/STRN. Saves to output_path, or to the Invoices folder in the user's home folder by default. Returns the file path and totals.
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": "create_invoice"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| invoice | Yes | ||
| overwrite | No | Replace the file if it exists (default false) | |
| urdu_words | No | Show the total in Urdu words for PKR (default true) | |
| output_path | No | Where to save the .html file (optional) |