Skip to main content
Glama

Create an invoice

create_invoice

Issue an invoice for a client using billable time between two dates; totals come from logged entries, and the number defaults to INV--NNN.

Instructions

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). The number defaults to the next INV--NNN. This creates a permanent record; confirm the client, period and dates with the user first.

Input Schema

TableJSON 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

TableJSON 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 observedv1.0.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnly=false, idempotent=false, destructive=false, so the safety profile is covered; the description adds genuinely useful behavior beyond that: totals are server-computed from logged entries, the number auto-defaults to the next INV-<year>-NNN, and the record is permanent. It stops short of saying whether the invoice can later be edited or must be deleted/reissued.

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 the core action, followed by derived behavior, defaults, and the safety caveat. No sentence is redundant and the most important warning comes last for emphasis.

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

Completeness5/5

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

For a mutating, non-idempotent tool with full annotation coverage, a 100%-covered schema and an output schema that handles return values, the description supplies everything an agent needs: what it creates, how totals are derived, numbering defaults, and the confirmation requirement.

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 description coverage is 100%, so the baseline is 3, but the description adds meaning the schema does not: totals are derived server-side (no amount inputs exist), lines map one-per-project, and the number parameter's default behavior is spelled out. It does not explain the effect of include_detail or compact_notes beyond what the schema already says.

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 names a specific verb and resource plus the exact source of the data ('an invoice for a client from billable time between two dates'), and it states the derived structure ('one line per project'). An agent can distinguish this from list_invoices, get_invoice, next_invoice_number and mark_invoice_paid without opening any schema.

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?

It gives clear conditions for use (billable time within a date range, for a specific client) and a strong precondition ('confirm the client, period and dates with the user first'). It does not, however, name alternatives or exclusions — e.g. that next_invoice_number can preview the number or that entries should be reviewed first.

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