# toknzer · Invoice Generator

A static, client-side invoice editor at <https://toknzer.com/invoices/>. Create, edit
and export invoices to PDF entirely in the browser — no server, no login, no tracking.

## Two ways an agent can drive this tool

### 1. Exchange the document format (works anywhere)

Build a JSON invoice document that conforms to
[invoice.schema.json](https://toknzer.com/invoices/invoice.schema.json) (JSON Schema
2020-12). See [invoice.example.json](https://toknzer.com/invoices/invoice.example.json).
A self-hostable MCP server that produces/validates this format is described in the
[MCP server card](https://toknzer.com/.well-known/mcp.json).

### 2. WebMCP (in-page tools)

When this page is opened in a WebMCP-capable agent browser, it registers tools on
`navigator.modelContext` so an agent can operate the live editor directly:

- `get_invoice_schema` — return the invoice JSON Schema
- `list_currencies` — supported ISO 4217 currencies
- `compute_invoice_totals` — subtotal, discount, tax, total, balance due
- `get_current_invoice` — read the invoice currently open in the editor
- `set_invoice` — replace the open invoice with a provided document
- `create_invoice` — create and open a new invoice from a document
- `download_pdf` — export the current invoice to PDF

Tool descriptors are also published on `window.toknzer.invoiceTools` for discovery.

## Document fields

See [llms.txt](https://toknzer.com/invoices/llms.txt) for the full field reference and
the totals arithmetic. Everything is free, client-side, and has no auth or rate limits.
