Skip to main content
Glama

update_invoice

DestructiveIdempotent

Change an invoice. Required: invoice_id. Optional: lines, title, recipient, address, intro, outro, payment_note, issued_on, due_days, status. Totals are always recomputed from the lines. Changing the lines of an invoice that has left the house needs force=true — cancelling and issuing a new one is usually correct.

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_id": "<invoice_id>"
    },
    "name": "update_invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
forceNotrue allows line changes on an invoice that was already sent
introNoIntroductory text printed above the positions
linesNoNew positions; replaces the existing lines of the invoice
outroNoClosing text printed below the positions
titleNoTitle of the invoice
statusNoNew status
addressNoPostal address
due_daysNoPayment term in days
issued_onNoIssue date of the invoice (YYYY-MM-DD)
recipientNoRecipient name on the invoice
invoice_idYesID of the invoice to change
payment_noteNoPayment information block (e.g. IBAN) printed on the invoice

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed12 schema fields changed
    • addedInput schema / properties / address / description
      Added value: +"Postal address"
    • addedInput schema / properties / due_days / description
      Added value: +"Payment term in days"
    • addedInput schema / properties / force / description
      Added value: +"true allows line changes on an invoice that was already sent"
    • addedInput schema / properties / intro / description
      Added value: +"Introductory text printed above the positions"
    • addedInput schema / properties / invoice_id / description
      Added value: +"ID of the invoice to change"
    • addedInput schema / properties / issued_on / description
      Added value: +"Issue date of the invoice (YYYY-MM-DD)"
    • addedInput schema / properties / lines / description
      Added value: +"New positions; replaces the existing lines of the invoice"
    • addedInput schema / properties / outro / description
      Added value: +"Closing text printed below the positions"
    • addedInput schema / properties / payment_note / description
      Added value: +"Payment information block (e.g. IBAN) printed on the invoice"
    • addedInput schema / properties / recipient / description
      Added value: +"Recipient name on the invoice"
    • addedInput schema / properties / status / description
      Added value: +"New status"
    • addedInput schema / properties / title / description
      Added value: +"Title of the invoice"
  2. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=true, and readOnlyHint=false, so the safety profile is covered. The description adds genuinely new behavior: totals are always recomputed from lines, and line edits on a sent invoice are gated behind force=true. It does not say what the response looks like or whether a failed non-forced edit errors or silently ignores the lines.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The critical constraint (force on sent invoices) and the recompute rule are front-loaded in a compact paragraph with no filler. The required/optional parameter roster partly duplicates the schema and could be trimmed, but it aids fast scanning.

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?

For a 12-parameter destructive mutation with no output schema, the description covers the two things an agent most needs: recomputation of totals and the force gate on sent invoices. Remaining gaps are permissions, valid status values, and the shape of the result, none of which are covered elsewhere.

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 coverage is 100%, so the baseline is 3, and the description adds meaning beyond it by coupling force to the lines parameter and warning that line edits on sent invoices will not proceed without it. The rest of the parameter list largely restates what the schema already documents, and it omits what values status accepts.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Change an invoice" gives a clear verb+resource, and the description enumerates the editable surface (lines, title, recipient, address, intro, outro, payment_note, issued_on, due_days, status) so the agent knows exactly what this mutation covers. It does not distinguish itself from the similarly named update_abaninja_invoice sibling, leaving ambiguity about which invoice system each targets.

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 states the condition that requires force=true (line changes on an already-sent invoice) and recommends the preferred alternative workflow (cancel and reissue) in that case, which is real when/when-not guidance. The gap is that it never names a concrete sibling tool for the cancel-and-reissue path or explains when to prefer this tool over update_abaninja_invoice.

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.