Skip to main content
Glama

Generate an invoice or quote PDF

generate_invoice
Read-onlyIdempotent

Build an invoice or quote PDF from company and client details, line items with quantities and rates, a tax rate, and an optional percent or flat discount. All money is computed in integer cents, so there are no float rounding errors. Returns the PDF as base64 plus the total.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "invoice": "<invoice>"
    },
    "name": "generate_invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
invoiceYes

Output Schema

NameRequiredDescriptionDefault
dataYesInvoice or quote PDF as base64.
bytesYesPDF size in bytes.
currencyYesISO currency code used for the invoice.
totalCentsYesGrand total in integer cents.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  2. Added

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already establish the safety profile (readOnlyHint=true, idempotentHint=true, openWorldHint=false), so the bar is lower, and the description still adds real value: it discloses that all money is computed in integer cents with no float rounding, and that the result is a base64 PDF plus a total. It stops short of mentioning size limits, page-count behavior, or whether repeated calls with identical input are guaranteed identical bytes.

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?

Two tight sentences with zero filler: the first covers inputs, the second covers the computational guarantee and return shape. The most decision-relevant content (what it builds, from what) is front-loaded.

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?

An output schema exists, so return values need not be explained in depth, and the description still briefly names them. For a tool whose single parameter is a deep nested object, it covers the essential fields and the computation model, but gaps remain around date/currency formatting expectations and the units of rate values.

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?

With 0% schema description coverage, the description must carry the semantics, and it covers the substantive parts: line items with quantities and rates, a tax rate, and a discount that can be percent or flat. It leaves the date fields, currency format, invoice number, and notes entirely to the schema patterns, and it does not resolve whether a line-item 'rate' is expressed in cents or major units, which is a meaningful ambiguity given the integer-cents computation note.

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 opens with a specific verb and resource ('Build an invoice or quote PDF') and immediately enumerates the source material (company/client details, line items, tax rate, discount). This makes it clearly distinct from the surrounding PDF utilities (compress_pdf, merge_pdf, split_pdf), which manipulate existing files rather than construct one from structured data.

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: the 'kind' distinction between invoice and quote is stated, and the required inputs signal when the tool applies, but there is no explicit when-to-use/when-not-to-use guidance or reference to an alternative. An agent can infer the context but must do the work itself.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.