Discount Calculator
discount_calculatorCalculate a discounted price, ordered stacked percentage discounts, savings, effective discount and total with an entered sales tax percentage after discounts.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"price": 100,
"discounts": [
20,
10
],
"salesTaxPercent": 5
},
"name": "discount_calculator"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| price | Yes | Original price (USD; at most two decimal places) | |
| discounts | Yes | Percent-off values applied to the remaining price in order; final price rounds to cents | |
| salesTaxPercent | No | Entered tax percentage applied after discounts to the cent-rounded price; default 0 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||