Guided workflows
The server includes three prompts and three resources to help an agent prepare correct invoice data, manage logos, and download generated artifacts. Prompts do not generate PDFs by themselves: they instruct the client agent to validate facts and then call a tool.
| Capability | Use |
|---|---|
Resource invoicepig_invoice_generation_guide | URI: invoicepig://guides/invoice-generation. Field mapping, validation, source handling, and output guidance. |
Resource invoicepig_artifact_download | MCP Apps download card for generated PDF and ZIP artifacts. |
Resource invoicepig_logo_manager | MCP Apps widget for the selected workspace’s reusable logo library. |
Prompt invoicepig_create_invoice | Required: request. Optional: preferences. Creates one invoice from prose or structured data. |
Prompt invoicepig_convert_document_to_invoice | Required: request. Optional: source_type. Converts one supplied receipt, quote, purchase order, or timesheet. |
Prompt invoicepig_create_invoice_batch | Required: request. Optional: grouping_rule. Creates 2–10 invoices from documents or tabular data. |
Recommended agent sequence
- Read only the supplied text or attachment using the host client’s document or vision capabilities.
- Establish issuer and customer roles. Never assume the merchant on a receipt is the invoice issuer.
- Extract confirmed facts into the payload fields.
- Ask about missing issuer, customer, line item, currency, tax treatment, or payment instructions.
- Call the single or batch tool once with normalized data.
- Inspect structured output. For batches, report each failed
results[].indexand retain successful PDFs.
Document conversion
InvoicePig does not download source URLs or perform OCR. Give the source document to an AI client that can read it. The client extracts and normalizes the data, asks for missing invoice fields, then calls the PDF tool.
For a receipt, use it as evidence for line items, amounts, and dates—not as an automatic determination of who should issue the invoice. Keep card data, security codes, credentials, and API keys out of the invoice request.
Example request
Create an invoice for Acme Corp for 10 hours of design work at $100 per hour, due in 14 days.
The agent should request missing sender, customer, tax, or payment details before generating the PDF. For multiple invoices, provide a grouping rule such as “one invoice per customer per month” and split source sets larger than 10 invoices.