Skip to main content
Glama
Storno CLI

Storno CLI

Official
by stornoro

invoices_update

Idempotent

Update a draft invoice's details or replace its entire line-item array; only draft-status invoices can be changed—issued invoices must be canceled instead.

Instructions

Update an existing draft invoice. Only invoices with status "draft" can be updated. When updating the lines array, the entire array is replaced — include all lines you want to keep. Once issued, use invoices_cancel instead.

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": {
      "uuid": "<uuid>"
    },
    "name": "invoices_update"
  }
}

Input Schema

NameRequiredDescriptionDefault
uuidYesInvoice UUID to update
linesNoInvoice line items. WARNING: replaces all existing lines — include every line you want to keep.
notesNoPublic notes visible to the client
dueDateNoPayment due date (YYYY-MM-DD)
clientIdNoClient UUID
currencyNoISO 4217 currency code
issuerIdNoIssuer ID number
languageNoDocument language for PDF generation (default: ro)
mentionsNoAdditional legal mentions
seriesIdNoInvoice series UUID
companyIdNoCompany UUID override (uses active company if not set)
issueDateNoInvoice issue date (YYYY-MM-DD)
deputyAutoNoDeputy vehicle registration
deputyNameNoDeputy/representative name
issuerNameNoName of person issuing the invoice
salesAgentNoSales agent name
orderNumberNoPurchase order number
plataOnlineNoEnable online payment via Stripe
platitorTvaNoWhether sender is VAT payer
receiverCifNoReceiver tax ID / CIF
vatIncludedNoWhen used with autoApplyVatRules, sets whether unit prices include VAT on all lines. Ensures correct totals after VAT rules change rates.
documentTypeNoDocument type
exchangeRateNoExchange rate relative to RON
internalNoteNoInternal note (not visible to client)
paymentTermsNoPayment terms description
receiverNameNoReceiver name (when no client entity exists)
taxPointDateNoTax point date (YYYY-MM-DD)
paymentMethodNoPayment method: bank_transfer, cash, card, cheque, other
tvaLaIncasareNoVAT on collection / TVA la încasare
ublExtensionsNoUBL extension fields for advanced e-Factura compliance. These map directly to UBL XML elements not covered by the standard invoice fields.
buyerReferenceNoBuyer reference identifier
contractNumberNoContract reference number
penaltyEnabledNoEnable late payment penalty
invoiceTypeCodeNoTax regime / invoice type code
deliveryLocationNoDelivery address
parentDocumentIdNoParent document UUID (for credit notes)
penaltyGraceDaysNoGrace period before penalty applies
projectReferenceNoProject reference number
taxPointDateCodeNoTax point date code
autoApplyVatRulesNoAuto-apply VAT rules (reverse charge for VIES-valid EU clients, OSS destination rate for non-VIES EU clients). Default: false.
showClientBalanceNoShow client balance on invoice
deputyIdentityCardNoDeputy ID card number
businessProcessTypeNoBusiness process type
penaltyPercentPerDayNoDaily penalty percentage
tenderOrLotReferenceNoTender or lot reference
despatchAdviceReferenceNoDespatch advice reference
buyerAccountingReferenceNoBuyer accounting reference
invoicedObjectIdentifierNoInvoiced object identifier
receivingAdviceReferenceNoReceiving advice reference

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.0.59
    • addedInput schema / properties / lines / items / properties / vatCategoryCode
      Added value: +{
      +  "description": "UBL VAT category code. Default S; a 0% rate becomes Z on its own. Set it only for special cases: O (not subject to VAT), E (exempt), AE (reverse charge), K (intra-community), G (export).",
      +  "type": "string"
      +}
    • addedInput schema / properties / lines / items / properties / vatRate
      Added value: +{
      +  "description": "VAT percentage for the line, e.g. 21, 11, 9 or 0. Wins over vatRateId. With neither sent the line gets 21%, so for a company that is not a VAT payer always send 0.",
      +  "type": "number"
      +}
    • changedInput schema / properties / lines / items / properties / vatRateId / description
      Previous value: -"VAT rate UUID (from vat_rates_list). Uses company default if not provided."New value: +"VAT rate UUID from vat_rates_list: the line takes that rate's percentage and category. Send this or vatRate. With neither, the line gets 21% VAT, also when the company is not a VAT payer."
  2. First observedv1.0.17

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true, and destructiveHint=false, so safety is covered structurally. The description adds two pieces of genuinely behavioral context not in the annotations: the draft-only eligibility rule and the fact that the lines array is fully replaced rather than merged. It does not say whether omitted scalar fields are left unchanged or reset, which is the main remaining ambiguity.

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?

Three short sentences with the eligibility constraint front-loaded, then the highest-risk write behavior, then the escape hatch. No filler and nothing buried.

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 49-parameter, deeply nested update tool with full schema coverage and safety annotations, the description covers the two highest-risk behaviors (draft-only and destructive lines replacement). The notable gap is update semantics for the other 47 fields, i.e. whether this behaves as a merge/patch or replaces unspecified values.

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% and the schema itself already warns that 'lines' replaces all existing lines, so the description's replacement note largely restates structured data. With 49 parameters fully documented in-schema, the baseline of 3 is appropriate; the description adds no field-level meaning beyond the single array warning.

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?

States a specific verb and resource ('Update an existing draft invoice') and adds the status precondition that defines the tool's scope. It names one sibling (invoices_cancel) for the issued-invoice case, though it does not differentiate from proforma_invoices_update or recurring_invoices_update, so sibling separation is only partial.

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?

Explicitly restricts use to invoices with status "draft" and routes the issued case elsewhere ('Once issued, use invoices_cancel instead'), which is real when/when-not/alternative guidance. The alternative is not a true substitute for editing an issued invoice, so the routing is slightly imperfect, but the decision boundary is clear.

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