Skip to main content
Glama

Billwise Invoice Maker

Generate invoice

generate_invoice
Read-onlyIdempotent

Use this when the user wants to make or generate an invoice, invoice template, bill, quote, estimate, receipt, or credit note as a downloadable PDF (invoice generator for freelancers, contractors, and small businesses), including 'how do I make an invoice for this work' once the work, client, and prices are known. Computes exact totals: per-line rounding to the currency's minor units (round half up), line and document discounts before tax, tax/VAT/GST summary grouped by rate, shipping, deposits and balance due; supports any ISO 4217 currency (JPY has no decimals). Returns totals plus PDF (A4 or Letter) and CSV download links. Does not email invoices to clients, track payments, process card payments, or give tax advice; the user supplies tax rates. Do not use to fabricate receipts for purchases that did not happen.

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": "generate_invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemsYesLine items, at least one, at most 200. Example: [{"description": "Design work", "quantity": 12, "unit": "hrs", "unit_price": 85}].
notesNoOptional note printed at the bottom, e.g. 'Thank you for your business.'
paperNoPDF paper size. Defaults to letter for US/Canada locales and A4 elsewhere.
clientNoWho receives the document: the client or customer.
localeNoOptional BCP 47 locale for number and date formats, e.g. en-US, en-GB, de-DE, pl-PL. Labels stay in English. Defaults to English for the currency's country.
numberNoDocument number exactly as it should appear, e.g. INV-0042. If omitted, one is derived from the issue date.
sellerNoWho issues the document: the user's business or freelance name, address, email, optional tax ID.
currencyNoISO 4217 currency code, e.g. USD, EUR, GBP, PLN, JPY. Defaults to USD. Minor units follow ISO 4217 (JPY has none, KWD has 3).
due_dateNoPayment due date (or valid-until date for quotes and estimates) as YYYY-MM-DD, e.g. 2026-10-16.
shippingNoOptional shipping or delivery charge, e.g. 15.
referenceNoOptional purchase order or project reference, e.g. PO-7781. For credit notes, the original invoice number.
tax_labelNoName of the tax shown on the document, e.g. VAT, GST, Sales tax. Defaults to Tax.
issue_dateNoIssue date as YYYY-MM-DD, e.g. 2026-10-02. Defaults to today (UTC).
amount_paidNoAmount already paid (deposit or partial payment), shown as a balance due, e.g. 500. Receipts default to the full total.
accent_colorNoOptional brand accent colour as hex, e.g. #1D4ED8. Defaults to #0E7C66.
document_typeNoKind of document: invoice (default), quote, estimate, receipt (records a payment already received), or credit_note (refund or correction of an earlier invoice).
amount_in_wordsNoSet true to print the total in English words, e.g. 'One thousand twenty and 00/100 USD'.
discount_amountNoOptional fixed discount on the whole document before tax, e.g. 50. Use either this or discount_percent.
discount_percentNoOptional discount on the whole document in percent, applied to the subtotal before tax, e.g. 10.
shipping_tax_rateNoTax rate in percent applied to shipping, e.g. 20. Defaults to 0 (shipping not taxed).
payment_terms_daysNoAlternative to due_date: days after the issue date, e.g. 14 for 'Net 14' or 30 for 'Net 30'. 0 means due on receipt.
payment_instructionsNoOptional free-text payment details from the user, e.g. bank name, IBAN, SWIFT, or a payment link. Never a card number.

Output Schema

NameRequiredDescriptionDefault
hintsYes
itemsYes
notesYes
paperYes
titleYes
clientYes
localeYes
numberYes
sellerYes
totalsYes
displayYes
currencyYes
due_dateYes
warningsYes
downloadsYes
due_labelYes
pdf_pagesYes
referenceYes
tax_labelYes
issue_dateYes
adjustmentsYes
minor_unitsYes
tax_summaryYes
accent_colorYes
tax_id_labelYes
document_typeYes
amount_in_wordsYes
payment_terms_daysYes
payment_instructionsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well beyond the annotations: discloses rounding to minor units with round-half-up, discount ordering before tax, tax summary grouped by rate, shipping, deposits and balance due, ISO 4217 minor-unit behavior (JPY has no decimals), and the return payload (totals plus PDF/CSV links). Annotations only cover safety/idempotency, so this behavioral detail is real added value.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Trigger and scope are front-loaded, then computation rules, then outputs, then exclusions — a good order. The sentences are dense with parenthetical asides and could be trimmed slightly, but almost every clause carries information an agent needs.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 22-parameter tool with nested objects, an output schema, and annotations covering safety, the description still supplies everything material: computation order, currency behavior, output artifacts, and hard behavioral boundaries. Nothing an agent needs to decide or call correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so baseline is 3; the description earns an extra point by explaining semantics the schema does not, such as tax grouping by rate, discounts applied to the subtotal before tax, and currency minor-unit handling. It stops short of mapping rules to specific fields (e.g. how amount_paid interacts with receipts), so not a 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('make or generate an invoice... as a downloadable PDF') and enumerates the document kinds (invoice, quote, estimate, receipt, credit note). The audience note (freelancers, contractors, small businesses) and the computed outputs make the function unmistakable without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit 'Use this when...' trigger including the conversational phrasing ('how do I make an invoice for this work') once inputs are known, plus explicit exclusions: no emailing, no payment tracking, no card processing, no tax advice, and no fabricated receipts. This is a full when/when-not specification.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources