Skip to main content
Glama
Storno CLI

Storno CLI

Official
by stornoro

receipts_update

Idempotent

Updates an existing draft or issued receipt and replaces all line items with the provided array. Use it to correct receipt details, currency, dates, or items.

Instructions

Update an existing receipt. Receipts in draft or issued status can be updated. Replaces all line items with the provided array.

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>",
      "issueDate": "<issueDate>",
      "currency": "<currency>",
      "lines": "<lines>"
    },
    "name": "receipts_update"
  }
}

Input Schema

NameRequiredDescriptionDefault
uuidYesUUID of the receipt to update
linesYesArray of line items (replaces all existing lines)
notesNoPublic notes on the receipt
clientIdNoUUID of the client (optional for receipts)
currencyYesCurrency code (e.g., RON, EUR, USD)
issuerIdNoUUID of the issuer user
mentionsNoAdditional mentions or instructions
seriesIdNoUUID of the receipt series
companyIdNoCompany UUID (overrides configured default)
issueDateYesDate of issue (YYYY-MM-DD)
issuerNameNoName of person issuing the receipt
salesAgentNoSales agent name
cardPaymentNoAmount paid by card (for mixed payments)
cashPaymentNoAmount paid in cash (for mixed payments)
customerCifNoCustomer tax ID / CIF (when no clientId is provided)
customerNameNoCustomer name (when no clientId is provided)
exchangeRateNoExchange rate to base currency
fiscalNumberNoFiscal receipt number assigned by the cash register
internalNoteNoInternal note (not visible to customer)
otherPaymentNoAmount paid by other method, e.g. meal ticket (for mixed payments)
paymentMethodNoPayment method used for the transaction
cashRegisterNameNoName or identifier of the cash register / fiscal printer
documentSeriesIdNoUUID of the document series to use (alternative to seriesId)
projectReferenceNoRelated project or order reference

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 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: -"UUID of the VAT rate"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."
    • changedInput schema / properties / lines / items / required
      Previous value: -[
      -  "description",
      -  "quantity",
      -  "unitPrice",
      -  "vatRateId"
      -]New value: +[
      +  "description",
      +  "quantity",
      +  "unitPrice"
      +]
  2. First observedv1.0.17

TDQS

A3.7/5.0
Behavior4/5

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

Beyond the annotations, it discloses two behavioral facts an agent needs: a status gate on the target record and replace-not-merge semantics for the line array. The annotation destructiveHint=false sits in mild tension with "replaces all line items", but the description is honest about the overwrite, so this is disclosure rather than contradiction. It still does not say whether omitted top-level fields are cleared or left untouched, nor what permissions/ownership the update requires.

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, no filler, with the action stated first and the constraining/overwrite semantics immediately after. Every sentence carries information an agent needs before calling.

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

Completeness3/5

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

For a 24-parameter mutation with no output schema and no annotations covering side effects, the description omits the single most important behavior for an update endpoint: whether unspecified fields are preserved or wiped. It also says nothing about what is returned or whether issued (fiscalized) receipts can be legally modified.

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 coverage is 100% and the schema already documents far more than the description does, including line-item replacement and the uuid-omit-to-create behavior. The description only echoes the lines-replacement rule, adding essentially no meaning beyond the structured fields for the other 23 parameters.

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?

"Update an existing receipt" states a specific verb and resource, and the second sentence narrows the applicable object set to draft or issued receipts. It does not name a sibling (e.g. receipts_create, receipts_issue, receipts_cancel) to contrast with, so differentiation comes from the name alone rather than the description.

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

Usage Guidelines3/5

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

The description gives a real precondition (only draft or issued receipts can be updated), which is more than most update tools offer. However it gives no routing guidance: it never says when to use receipts_issue or receipts_cancel instead, nor what to do for receipts in other statuses (e.g. refunded/cancelled), so an agent must infer the boundaries.

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