Skip to main content
Glama

Create an invoice

create_invoice

Issue an invoice for a client from billable time between two dates. Totals are computed on the server from the logged entries (one line per project). Time already on another invoice is left out, so the same hours are never billed twice. The number defaults to the next free INV--NNN. This creates a permanent record; confirm the client, period and dates with the user first.

Input Schema

NameRequiredDescriptionDefault
toYesLast day of the billed period
fromYesFirst day of the billed period
notesNoNotes printed on the invoice (max 1,000 characters)
clientYesClient id or exact client name
numberNoInvoice number; defaults to the next INV-<year>-NNN
due_dateNoPayment due date, YYYY-MM-DD, or null for none
issue_dateYesThe invoice date, YYYY-MM-DD
compact_notesNoShorten entry descriptions to about 100 characters
include_detailNoPrint each entry under the lines

Output Schema

NameRequiredDescriptionDefault
idYes
hoursYes
linesYesOne line per project
totalYesDollars
clientYes
numberYes
periodYes"YYYY-MM-DD to YYYY-MM-DD"

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Adds behavior annotations cannot express: totals are computed server-side, entries already invoiced are silently excluded so hours are not double-billed, numbering auto-assigns INV-<year>-NNN, and the record is permanent. The dedupe rule in particular is non-obvious and changes how an agent should construct the call.

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?

Four sentences, front-loaded with what is billed, then the computation/ dedupe rule, then the numbering default, then the confirmation warning. No filler and no repetition of schema text.

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 no explanation, and annotations declare the write profile; the description covers the non-obvious generation logic well. It leaves open the failure case (no billable entries in the range) and whether the invoice is issued as draft or final, which matter for a permanent record.

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 schema already documents all nine parameters and the description correctly does not restate them at length. It adds only that `number` defaults to next free INV-<year>-NNN (already in the schema) and says nothing about compact_notes, include_detail, or due_date behavior. Baseline 3 applies.

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 resource and, crucially, the data source: an invoice built from billable time between two dates, with one line per project. That distinguishes it from get_invoice, list_invoices, and next_invoice_number without needing the schemas.

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?

Gives a concrete pre-flight instruction ('confirm the client, period and dates with the user first'), which is exactly the guidance needed before a non-idempotent write. It does not point at alternatives (e.g. next_invoice_number or list_entries to preview billables) or state what to do if no unbilled time exists, so it stops short of explicit when/when-not routing.

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.