Skip to main content
Glama

Receipt PDF

doc_receipt
Read-onlyIdempotent

Generate sales receipts as PDF with 80mm thermal-roll or A5 layouts, covering shop header, items, discounts, tax, totals, payment, and change.

Instructions

Make a simple sales receipt as PDF: an 80 mm thermal-roll receipt (page height fits the content, monospace) or an A5 page. Shop header (name, address, phone, tax number), receipt number with prefix, date/time, customer, items (name × qty × price), discount (% or fixed amount), tax % after discount, total, payment method, amount paid and change, note and footer. Same maths as the website: amounts rounded half-up to 0, 2 or 3 decimals. Also returns the totals and a 32-column plain-text version. English labels, Latin text only for now. Web version: https://s3eidat.github.io/receipt-maker/

Input Schema

NameRequiredDescriptionDefault
noNoReceipt number.
payNoPayment method.cash
taxNoTax rate % applied after the discount.
discNoDiscount: a percentage, or an amount when discType is "amt".
noteNoNote line above the footer.
paidNoAmount the customer paid (shows change).
shopNoShop details: name, address, phone, taxId, currency, decimals, prefix, footer.
whenNoDate and time, YYYY-MM-DDTHH:MM (default now).
itemsYesItems: name, qty, price.
formatNothermal = 80 mm roll (default), a5 = A5 page.thermal
outputNoWhere to write the result: a file path, or a folder ending in "/". Default: the server output folder (a temp folder unless --out-dir is set).
customerNoCustomer name or table (optional).
discTypeNopct = percent of subtotal (default), amt = fixed amount.pct
returnBase64NoAlso return the output as base64 in the result (only for small files). Default false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Beyond the annotations, the description discloses that amounts are rounded half-up to 0/2/3 decimals, that tax is applied after discount, and that the call also returns totals plus a 32-column plain-text version — useful behavioral detail. It leaves the disk-write side effect only in the schema, which sits in mild tension with readOnlyHint=true, but the description itself does not assert read-only.

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?

A single dense paragraph that front-loads what is produced and then lists the rendered fields, with no filler beyond the marketing-style URL. It is long but every clause maps to an actual capability of the tool.

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?

For a 14-parameter, nested-object tool with no output schema, the description covers layout, content, rounding rules, returned text version and a character-set limitation. Only the file-writing/path behavior and error cases are left entirely to the schema, which is adequate.

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 coverage is already 100%, so the baseline is 3; the description goes further by explaining the computation order (discount as % or fixed, then tax, then total/paid/change) and the role of prefix, currency and decimals in the rendered output. That adds meaning beyond the per-field schema text.

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

Purpose4/5

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

States a specific verb and artifact ('Make a simple sales receipt as PDF') and enumerates the two layouts (80 mm thermal roll vs A5) plus the exact content fields. An agent can tell this is a receipt generator, not a generic PDF tool, though it never names the nearest sibling (doc_invoice) to contrast with.

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

Usage Guidelines3/5

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

Usage is only implied by the content list and the 'English labels, Latin text only for now' limitation; there is no explicit when-to-use, when-not-to-use, or pointer to doc_invoice for invoices. The website reference hints at the expected use case but does not route between tools.

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

Deploy Server

Other Tools