Generate GST invoice
generate_gst_invoiceUse this when the user wants a GST invoice in the GST invoice format (a GST bill format or tax invoice for India) as a PDF and Excel file. Convert what the user pastes, or an uploaded photo or image of a bill or order, into the fields: seller {name, gstin, address, state}, buyer {name, gstin, address, state} and items [{description, hsn, qty, unit, rate, discount, gst_rate}]; details is only a fallback for text you cannot split. Decides CGST + SGST (or UTGST) or IGST from the place of supply, reads state codes from GSTINs, flags an invalid GSTIN without refusing, adds the HSN-wise summary, rounds the total to the nearest rupee and writes amounts in words (lakh, crore). Does not make an e-invoice (IRN, QR) or e-way bill, does not pick GST rates, and does not compute cess. Do not use for export invoices, invoices outside India or invoices without GST.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "generate_gst_invoice"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sez | No | true when the buyer is an SEZ unit or developer: IGST applies even in the same state. Default false. | |
| bank | No | Optional bank details to print: {account_name, bank_name, account_number, ifsc, branch, upi}. | |
| buyer | No | The buyer: {name, gstin (if registered), address, state}. The buyer's state decides CGST + SGST or IGST unless place_of_supply is given. | |
| items | No | Line items as objects: [{"description":"Steel rod 12mm","hsn":"7214","qty":10,"unit":"kg","rate":520,"gst_rate":18}]. Text lines like "Steel rod, HSN 7214, 10 kg @ 520, 18%" are a fallback. | |
| terms | No | Optional terms or notes to print, e.g. "Payment within 30 days. Goods once sold will not be taken back." | |
| copies | No | 1 (default, original), 2 (original + duplicate) or 3 (original, duplicate for transporter, triplicate for supplier). | |
| seller | No | The seller issuing the invoice: {name, gstin, address, state, phone, email}. | |
| details | No | Fallback only: the invoice details pasted as text when they cannot be split into the fields above. | |
| ship_to | No | Optional delivery address when it differs from the buyer's, e.g. {"name":"Mehta Stores Warehouse","address":"Plot 7, GIDC, Vapi","state":"Gujarat"}. | |
| due_date | No | Optional due date, e.g. "2026-11-27", or terms such as "net 30", "30 days" or "on receipt". | |
| page_size | No | "A4" (default) or "Letter". | |
| invoice_date | No | Invoice date, e.g. "2026-10-28" or "28/10/2026" (day first). Default: today in India. | |
| invoice_number | No | Invoice number, up to 16 letters, digits, - or /, e.g. "INV/2026-27/045". | |
| reverse_charge | No | true when tax is payable on reverse charge. Default false. | |
| place_of_supply | No | Optional place of supply (state name or code), e.g. "Karnataka" or "29". Default: the ship-to state, else the buyer's state, else the seller's state. | |
| prices_include_gst | No | true when the rates already include GST (the taxable value is worked out from them). Default false. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| buyer | Yes | ||
| lines | Yes | ||
| notes | Yes | ||
| seller | Yes | ||
| supply | Yes | ||
| totals | Yes | ||
| due_date | Yes | ||
| tax_type | Yes | ||
| warnings | Yes | ||
| downloads | Yes | ||
| hsn_shown | No | ||
| assumptions | Yes | ||
| hsn_summary | Yes | ||
| lines_shown | No | ||
| invoice_date | Yes | ||
| tax_in_words | Yes | ||
| invoice_number | Yes | ||
| reverse_charge | Yes | ||
| total_in_words | Yes | ||
| place_of_supply | Yes | ||
| prices_include_gst | Yes |