Skip to main content
Glama

Refund receipt

loyverse_refund_receipt
Destructive

Issue refunds against existing receipts, in full or for selected line items, to process payment and restore stock. Confirm receipt number and quantities first.

Instructions

Issue a refund against an existing receipt, in full or for named line items. This moves money and restores stock, and it cannot be undone through the API. Always confirm the receipt number, the lines and the quantities with the user first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceNo
store_idNo
line_itemsYes
employee_idNo
receipt_dateNoISO 8601 timestamp.
receipt_numberYesThe receipt being refunded.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.2/5.0
Behavior5/5

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

Annotations already mark destructiveHint=true and readOnlyHint=false, but the description adds crucial context: 'moves money and restores stock' and 'cannot be undone through the API'. This goes beyond the annotations by specifying the concrete side effects and irreversibility.

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 sentences with no filler. The main action is front-loaded, followed by side effects and a safety note. Every sentence earns its place.

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?

The description covers the core purpose, side effects, and a usage caution, but omits details about optional parameters and does not describe the response format (no output schema). It also leaves ambiguity about how to specify a full refund given line_items is required. Adequate for basic use but incomplete for a mutation tool with multiple undocumented parameters.

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 33%, leaving source, store_id, and employee_id undocumented. The description does not explain these parameters or clarify how 'full' refunds map to the required line_items array. It adds little meaning beyond the schema, failing to compensate for the low coverage.

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 states a specific verb ('Issue a refund'), the resource ('an existing receipt'), and the scope ('in full or for named line items'). It clearly distinguishes from siblings like create_receipt or get_receipt by focusing on refunds.

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 implies when to use it (for refunding an existing receipt) and gives a caution to confirm details with the user. However, it does not explicitly name alternatives or state when not to use it, such as referencing loyverse_create_receipt for new sales.

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