Skip to main content
Glama

Create receipt

loyverse_create_receipt

Record a completed sale in Loyverse by posting line items and a single payment, updating stock and sales reporting in real time.

Instructions

Record a sale. This posts a real transaction to the merchant's books and affects stock and reporting, so confirm the line items and total with the user before calling it. A receipt created through the API can carry only one payment type; split tender is not supported.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteNo
orderNoYour own order reference.
sourceNoName of the system recording the sale.
paymentsYes
store_idNo
line_itemsYes
customer_idNo
employee_idNo
receipt_dateNoISO 8601 timestamp. Defaults to now.
total_discountsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.3/5.0
Behavior5/5

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

Even though annotations mark readOnlyHint=false, the description goes further by warning that this posts a real transaction to the merchant's books, affects stock and reporting, and supports only a single payment type. These side effects and constraints are not visible in the structured annotations and are crucial for safe invocation.

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 no fluff: the core action is front-loaded, then the critical confirmation warning, then the concrete payment limitation. Every sentence earns its place.

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 high-complexity mutation tool with no output schema, the description covers the essential behavioral warnings and the key API limitation. It does not describe the created receipt response or error conditions, but the schema still provides structural detail for the parameters, making the definition broadly sufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 30%, so the description carries a heavy burden, but it only references 'line items' and 'total' broadly and the single-payment constraint. It does not explain most of the 10 parameters such as store_id, customer_id, discounts, modifiers, or taxes, leaving the agent under-informed for a complex payload.

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?

The description opens with 'Record a sale,' a specific verb and resource, and then explains that it posts a real transaction affecting books, stock, and reporting. This clearly distinguishes it from sibling receipt tools like list_receipts, get_receipt, and refund_receipt.

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?

The description explicitly tells the agent to confirm line items and totals with the user before invoking this side-effectful tool, and it flags a concrete limitation: only one payment type is supported, so split tender is not possible. It lacks explicit mention of alternatives such as refund_receipt for reversals, but the usage context is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.