Skip to main content
Glama
Himaan1998Y

pretext-pdf-mcp

by Himaan1998Y

generate_invoice

Generate professional invoice PDFs from structured JSON data with support for multiple currencies, line items, tax rates, and UPI QR codes.

Instructions

Generate a professional invoice PDF. Accepts structured invoice data (from/to parties, line items, optional GST/tax). Returns base64-encoded PDF. Supports INR/USD/EUR/GBP currencies. Currency symbols (₹ $ € £) are guaranteed not to break away from adjacent numbers across line wraps. gst_rate on items creates a tax column — use it for any tax system (GST, VAT, sales tax). Per-item gst_rate is summed as IGST in the totals; CGST/SGST inter-vs-intra-state routing is not currently supported.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fromYesIssuing party (your company)
toYesBilling party (client)
invoice_numberNoInvoice identifier e.g. INV-2026-001
dateNoInvoice date ISO format YYYY-MM-DD. Defaults to today.
due_dateNoPayment due date ISO format.
currencyNoCurrency. Default: INR
itemsYesLine items
notesNoAdditional notes or payment terms.
upi_qr_dataNoUPI payment string for QR code, e.g. "upi://pay?pa=merchant@upi&pn=Name&am=1000". When provided, a scannable QR code is embedded in the PDF.
filenameNoSuggested filename without .pdf extension.
Behavior4/5

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

Discloses behavioral traits beyond the schema: returns base64 PDF, currency symbols handling, tax column behavior, and IGST limitation. No annotations are present, so the description carries the full burden; it covers key aspects well.

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

Conciseness5/5

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

Concise and well-structured: 7 sentences front-loaded with main purpose, then supplementary details. Every sentence adds value without redundancy.

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

Completeness4/5

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

Given the tool's complexity (10 params, nested objects, no output schema), the description covers essential aspects: return format, supported currencies, tax behavior, and UPI QR. It is complete for an agent to use effectively.

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?

Adds meaning beyond input schema by explaining gst_rate usage, common Indian GST slabs, and UPI QR code embedding. With 100% schema coverage, the description enriches parameter understanding.

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?

The description clearly states it generates a professional invoice PDF from structured data, specifying the return format (base64-encoded PDF) and key features. This distinguishes it from sibling tools like generate_from_markdown or generate_pdf.

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

Usage Guidelines4/5

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

Provides good context on when to use (structured invoice data, optional tax, multiple currencies) and notes a limitation (CGST/SGST routing not supported). However, it does not explicitly mention when not to use or compare with siblings.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Himaan1998Y/pretext-pdf-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server