Skip to main content
Glama

Update invoice

update_invoice
Destructive

Update an existing invoice: status, paid date, lines, customer, dates, amounts, appearance and other fields. Find the invoice ID with list_invoices first, and resolve new customers or products with list_customers/list_products. Fields left out keep their current values. Passing items replaces every line with the given list, in that order. pdfUrl is a private, signed download link that expires at pdfUrlExpiresAt (1 hour). Give it to the user to open or download the PDF; don't put it in emails, notes, or anything that has to keep working.

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": {
      "id": "<id>"
    },
    "name": "update_invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesInvoice ID to update (from list_invoices)
itemsNoThe complete new list of lines, in print order. Replaces all current lines, so include the ones to keep.
footerNoFooter printed at the bottom of every page. Plain text or simple HTML (p, br, h1-h3, strong, em, u, s, a, ul, ol, li, span with color or text-align); other markup and scripts are removed. An empty string means no footer.
statusNoNew invoice status. When only status and/or paidDate are given, the PDF is not regenerated.
dueDateNoNew due date (ISO string or null to clear)
taxRateNoNew tax rate
taxTypeNoNew tax type
currencyNoNew currency code
discountNoNew discount as a fixed amount
languageNoLanguage of the printed labels and title. One of: en (English), de (German), fr (French), es (Spanish), pt (Portuguese), it (Italian), ar (Arabic), zh (Chinese), ja (Japanese), kr (Korean), tr (Turkish), az (Azerbaijani)
paidDateNoDate the invoice was paid (ISO string). Setting this automatically marks the invoice as PAID. Pass null to clear.
templateNoPDF design: regular (Regular), bold-professional (Bold Professional), tech-minimal (Mono), startup-modern (Startup Modern)
issueDateNoNew issue date (ISO string)
projectIdNoProject ID to link the invoice to, or null to unlink
customerIdNoNew customer ID (replaces the current customer)
dateFormatNoHow dates print. 'Month DD, YYYY' prints December 31, 2025; 'Mon DD, YYYY' prints Dec 31, 2025; 'DD Mon YYYY' prints 31 Dec 2025
endMessageNoNew note to the customer printed after the totals (empty string clears)
invoiceModeNoNew invoice mode
taxIncludedNoWhether tax is included in prices
assignedToIdNoEmployee ID to assign the invoice to, or null to unassign
customFieldsNoReplace all custom fields with these, in print order (empty array clears)
invoiceTitleNoDocument title printed at the top. Omit to keep the current title; an empty string resets it to the translated word for 'Invoice'.
shippingCostNoNew shipping cost
invoiceNumberNoNew invoice number
currencyFormatNoHow amounts print: NARROW_SYMBOL ($1,234.50), SYMBOL (US$1,234.50), CODE (USD 1,234.50), NAME (1,234.50 US dollars), ACCOUNTING (($1,234.50) for negatives)
termsOfPaymentNoNew payment terms (empty string clears)
paymentMethodIdsNoReplace the printed payment methods with these saved payment method IDs (empty array prints none)
acceptOnlinePaymentsNoTurn online payment from the shared invoice link on or off

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the annotations it discloses partial-update semantics ('Fields left out keep their current values'), destructive replacement semantics for items, a side-effect exemption (status/paidDate only does not regenerate the PDF), and the existence of a short-lived signed pdfUrl. The pdfUrl detail is essential behavior not present in any structured field.

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?

Front-loads the scope of updatable fields, then the ID-resolution prerequisite, then the mutation semantics, then the pdfUrl caveat. Every sentence carries information, though the items-replacement sentence partially restates the schema.

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 28-parameter destructive mutation with no output schema, the description covers the update model, replacement semantics, prerequisites, a side-effect exemption, and handling of the returned signed URL. Nothing an agent needs to invoke it safely is missing.

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, but the description adds cross-cutting meaning the schema does not: omitted fields retain current values and the items array is an ordered full replacement. It slightly duplicates the schema's own items-replacement wording, preventing a 5.

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 ('Update') plus resource ('an existing invoice') and enumerates the categories of mutable fields (status, paid date, lines, customer, dates, amounts, appearance). This clearly separates it from create_invoice, delete_invoice, and fetch_invoice siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit prerequisites and routes to alternatives: 'Find the invoice ID with list_invoices first, and resolve new customers or products with list_customers/list_products.' That names the exact sibling tools and the condition for calling them before this one.

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.

Resources