calculate_margin
Gross margin AND markup for the same deal, plus reverse pricing from a target margin or markup and the real margin cost of a discount.
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": {
"cost": "<cost>"
},
"name": "calculate_margin"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cost | Yes | Unit cost (what you paid) | |
| price | No | Selling price — omit if you are solving from a target | |
| marginPct | No | Target gross margin % — solve for price | |
| markupPct | No | Target markup % — solve for price | |
| discountPct | No | Discount to test against the resulting price |