Skip to main content
Glama

promptbill_generate_invoice_pdf

Generates a local PDF invoice that combines per-repo AI coding spend with optional labor hours, markup, and GST/VAT for client billing.

Instructions

Generate a native PDF 1.4 client pass-through invoice combining local AI coding spend per Git repo with optional engineering labor, markup %, and GST/VAT. Writes the PDF locally on disk.

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": {
      "clientName": "<clientName>"
    },
    "name": "promptbill_generate_invoice_pdf"
  }
}

Input Schema

NameRequiredDescriptionDefault
daysNoLookback window in days.
demoNoGenerate invoice from demo data.
reposNoGit repositories to include on this client invoice (defaults to all scanned repos).
outPathNoOutput PDF file path (defaults to ./<invoiceNumber>.pdf).
currencyNoInvoice currency (default USD).
laborRateNoOptional hourly rate.
clientNameYesClient or company name on the invoice.
laborHoursNoOptional engineering hours to include.
taxPercentNoGST/VAT percentage (default 0).
clientEmailNoOptional client billing email.
exchangeRateNoFX multiplier from USD to currency (default 1.0).
markupPercentNoAI compute pass-through markup % (default 0).
includeAuditAppendixNoInclude Page 2 Sanitized AI Compute Audit Appendix (requires Pro/Agency license).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden, and it does disclose the key side effect: 'Writes the PDF locally on disk.' It does not cover overwrite behavior for outPath collisions, what happens with zero scanned repos, or the dependency on prior scan data, so a mutation tool remains only partially characterized.

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 sentences, both front-loaded with the highest-value information: the output format first, then the side effect. No filler, no restatement of the tool name, and the write location is stated last where it matters.

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

Completeness3/5

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

For a 13-parameter write tool with no annotations and no output schema, the description covers output format and destination but omits input dependencies, failure/overwrite behavior, and the licensing constraint that only appears buried in the schema's audit-appendix param. Adequate, not complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline applies; every parameter including days, repos, currency, markupPercent, taxPercent, exchangeRate and includeAuditAppendix is already documented in the schema. The description adds only the framing that labor is 'optional' and compute is a 'pass-through', not new syntax or interaction details.

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?

States a specific verb and artifact ('Generate a native PDF 1.4 client pass-through invoice') and enumerates exactly what the document composes: local AI coding spend per Git repo, optional labor, markup %, and GST/VAT. The PDF/disk output makes it trivially separable from promptbill_export_csv and the read-only scan/spend siblings.

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 implied by the artifact produced: an agent can infer this is the tool for producing a client-facing invoice. It offers no explicit when-to-use/when-not guidance, no statement of prerequisites (e.g. prior promptbill_scan_usage), and never contrasts itself with promptbill_export_csv for tabular output.

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