Skip to main content
Glama
Storno CLI

Storno CLI

Official
by stornoro

receipts_create

Create a draft receipt for point-of-sale transactions with line items, payment details, and optional fiscal register data. Default receipt series is auto-assigned if omitted.

Instructions

Create a new receipt (bon fiscal) in draft status. Receipts document point-of-sale transactions with payment method details and optional fiscal register information. Can later be issued and converted to invoices. A default receipt series is auto-assigned if neither seriesId nor documentSeriesId is provided.

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

Input Schema

NameRequiredDescriptionDefault
linesYesArray of line items (minimum 1 required)
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 (uses default series if not provided)
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 (default: 1.0 for RON)
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
idempotencyKeyNoUnique key for retry-safe submissions. Repeat calls with the same key return the originally created receipt instead of creating a duplicate. Recommended for queued offline POS sales and ambiguous timeouts.
cashRegisterNameNoName or identifier of the cash register / fiscal printer
documentSeriesIdNoUUID of the document series to use (alternative to seriesId; uses default receipt series if neither is provided)
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.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false and destructiveHint=false; the description adds useful context beyond them — that the record starts in draft (so it is not finalized on creation), that it can later be issued/converted, and that a default series is applied silently. It does not mention permission requirements or what object is returned, but for a create tool with annotations covering the safety profile this is solid.

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?

Three sentences that are front-loaded with the action and result state, with no filler. The middle sentence on point-of-sale semantics is slightly general given the schema already implies it, but nothing is padded.

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 creation tool with no output schema, the description covers lifecycle and series defaulting but says nothing about the response (created id, status field) that the agent would need to chain into receipts_issue or receipts_pdf. Adequate, but a returning-agent would still be guessing about the return payload.

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 each of the 24 parameters carries a detailed description (including vatRate precedence, idempotencyKey semantics, mixed-payment fields). The description's only parameter-level addition is the seriesId/documentSeriesId defaulting rule, which duplicates the schema text, so the baseline 3 applies.

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 ('Create a new receipt (bon fiscal)') plus the resulting state ('draft status'), and the second/third sentences outline the lifecycle (issued, converted to invoices), which implicitly separates it from receipts_issue and receipts_convert_to_invoice. It stops short of explicitly naming those siblings, so it isn't a full 5.

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?

Usage is implied rather than stated: the tool is for recording point-of-sale transactions that are not yet issued, and a default series is auto-assigned when no series id is given. There is no explicit when-to-use/when-not or naming of an alternative (e.g. invoices_create for invoicing directly), leaving the agent to infer routing from sibling names alone.

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