Discount Stack
discount_stackStack discounts correctly: sequential vs additive comparison. PREMIUM (license).
The two methods differ — this shows both, the final price, and the true total discount. Typical input {"price": 200, "discounts_pct": [20, 10]} returns {"original": 200, "sequential_price": 144.0, "sequential_total_discount_pct": 28.0, "additive_price": 140.0, "difference": 4.0, "note": "..."}.
Use when more than one discount applies and the order changes the answer. Not for a single discount inside an invoice (invoice_total). Errors: on invalid, missing, or malformed input this tool never raises a protocol error — it returns {"error": ""} (for example {"error": "price > 0 and at least one discount required"}). Every call is read-only and idempotent, so after correcting the input it is always safe to retry.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| price | Yes | Original price before discounts; must be greater than 0. | |
| discounts_pct | Yes | Discount percentages in the order applied, at least one, e.g. [20, 10] for 20% then 10%. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||