discount_calculator
Compute the final price after discount, total savings, and effective discount percentage from original price and discount amount or percentage.
Instructions
Calculate the discounted price, amount saved, and effective discount percentage.
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": {
"original_price": "<original_price>",
"discount": "<discount>"
},
"name": "discount_calculator"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| original_price | Yes | Original price before discount | |
| discount | Yes | Discount amount or percentage | |
| discount_type | No | Whether discount is a percentage or fixed amount | percent |