Price from a competitor pricing rule
apply_pricing_ruleGives the price a competitor-based pricing rule produces for one product: match, or a percentage or amount below or above the cheapest, middle or highest competitor price, held between a lowest and highest markup on cost. The caller supplies the competitor prices; none are looked up.
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": {
"yourPrice": "<yourPrice>",
"competitorPrices": "<competitorPrices>",
"target": "<target>",
"mode": "<mode>"
},
"name": "apply_pricing_rule"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | Match the target, or sit below or above it. | |
| unit | No | Whether offset is a percentage ("pct") or an amount of money ("amount"). | pct |
| offset | No | How far below or above the target. Leave out for "match". | |
| target | Yes | Which competitor price to aim at: the cheapest, the middle (median) or the highest. | |
| unitCost | No | What one unit costs the store. Needed for the markup limits. | |
| yourPrice | Yes | The store's current price for the product. | |
| maxMarkupPct | No | Never price over cost plus this percentage. | |
| minMarkupPct | No | Never price under cost plus this percentage. | |
| competitorPrices | Yes | What other stores charge for the same product, in the same currency as yourPrice. |