# pretext-pdf

Generate professional PDFs from structured JSON. Supports invoices (with GST), reports, tables, encryption, and more. No headless browser — pure Node.js.

## Quick Start

```bash
# Connect this server (installs CLI if needed)
npx -y @smithery/cli@latest mcp add himaan4149-kv55/pretext-pdf

# Browse available tools
npx -y @smithery/cli@latest tool list himaan4149-kv55/pretext-pdf

# Get full schema for a tool
npx -y @smithery/cli@latest tool get himaan4149-kv55/pretext-pdf generate_pdf

# Call a tool
npx -y @smithery/cli@latest tool call himaan4149-kv55/pretext-pdf generate_pdf '{}'
```

## Direct MCP Connection

Endpoint: `https://pretext-pdf.run.tools`

## Tools (4)

- `generate_pdf` — Generate a PDF from a pretext-pdf document descriptor (PdfDocument JSON). Returns base64-encoded PDF bytes. Use list_el…
- `generate_invoice` — Generate a professional invoice PDF. Accepts structured invoice data (from/to parties, line items, GST). Returns base64…
- `generate_report` — Generate a professional multi-section report PDF with optional TOC, tables, and callout boxes. Returns base64-encoded P…
- `list_element_types` — Returns a markdown reference of all pretext-pdf element types and their key properties. Use this before calling generat…

```bash
# Get full input/output schema for a tool
npx -y @smithery/cli@latest tool get himaan4149-kv55/pretext-pdf <tool-name>
```
