Check a promo code
check_promoCheck whether a promo code applies to a basket of slimes (by slug and quantity) and estimate the saving. A rejected code returns valid=false with the shop's standard message; checkout always re-checks codes.
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": {
"code": "<code>",
"items": "<items>"
},
"name": "check_promo"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Promo code exactly as the shopper has it, e.g. 'WELCOME10' | |
| items | Yes | The slimes the code would apply to; codes can depend on the basket |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| valid | Yes | ||
| message | Yes | ||
| subtotal_gbp | Yes | Slimes subtotal before the discount in pounds sterling (GBP), e.g. 8.99 | |
| discount_type | Yes | ||
| subtotal_pence | Yes | Slimes subtotal before the discount in pence (GBP minor units), e.g. 899 | |
| discount_summary | Yes | ||
| promo_description | Yes | ||
| estimated_discount_gbp | Yes | Estimated saving on the subtotal in GBP; checkout confirms it | |
| estimated_discount_pence | Yes |