Skip to main content
Glama

Create an invoice

invoice_create

Create an invoice from line items, returning a record with a never-reused number. Per-line rounding keeps printed totals accurate; one currency per invoice.

Instructions

Create an invoice from line items and return the record with its next, never-reused number. unit_price is in MAJOR units; lines are rounded then summed. One currency per invoice. Free: 3 a month.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYesLine items. Amounts are held as integer minor units and every line is rounded first, then summed, so the printed lines can never disagree with the total. A line may carry its own currency
notesNoFree text printed under the totals
clientYesClient name or id. Unknown names are added automatically
currencyNoInvoice currency, 3-letter ISO code. Defaults to the one currency every item agrees on, else your business default. Every line on one invoice must agree with it; a mix is refused with the exact conversion argument to pass rather than billed as if it were one currency
due_daysNoDays until due, defaults to your payment terms
issue_dateNoYYYY-MM-DD, defaults to today
discount_percentNoDiscount percent applied to every line before tax, 0-100

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.20.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the burden of behavioral disclosure. It explains important non-obvious behavior: never-reused numbers, major-unit pricing, line rounding before summation, one-currency enforcement, and the 3-per-month free quota. It does not discuss broader side effects or permissions, but the core behavior is well covered.

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 short sentences with no filler. The purpose is front-loaded, followed by the most decision-relevant constraints: pricing units, rounding behavior, currency, and quota.

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?

The input schema is rich and covers all parameters, and the description names the key return behavior (the record with its never-reused number). There is no output schema and no annotations, so a bit more detail about the response shape or quota enforcement would make it fully complete, but what is present is sufficient for correct invocation in most cases.

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 is 3. The description restates major units, rounding, and one-currency constraints that already exist in the unit_price, items, and currency schemas, adding no new parameter-level meaning beyond what the schema already provides.

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 uses a specific verb and resource: "Create an invoice from line items" and adds the key output trait of a never-reused invoice number. This clearly distinguishes it from read/manage siblings like invoice_get, invoice_list, and invoice_from_hours.

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?

The phrase "from line items" gives clear context: this tool is for explicit itemized invoicing rather than hour-based invoicing, which separates it from invoice_from_hours. It does not explicitly name alternatives or state when-not-to-use, so it falls short of a 5.

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