How much to buy for N portions (paid, $0.01)
calculate_amount_to_buyCalculate how much of an ingredient to buy for a target number of portions and serving size, with rounded-up purchase weights and optional cost and food-cost percentages.
Instructions
How much to buy: e.g. how much brisket for 120 people at 180 g cooked each. Send ingredient, portions and portion size (g, kg, lb, oz); get the weight to buy (best/mid/worst, rounded up) from head chef Cristopher's verified trim and cook-loss ranges. Add price per kg/lb and menu price ex GST/VAT for total cost, cost per portion and that ingredient's food cost %, with workings. Refused, never guessed: allergen, curing and preserving terms. Only a 200 answer is charged; refusals and 404s are free.
Use when the user starts from portions ("120 people, 180 g cooked each"). For "I bought 5 kg, what do I get", use calculate_yield_and_cost instead. portionSize is one portion as served (cooked when basis is cooked). For cost, give pricePerKg or pricePerLb (the price as bought; not both, and not "price"). sellPrice is the ex-tax menu price of one portion and needs one of them. currency is required: the user's 3-letter currency code (display only). Costs $0.01. Paid automatically in USDC with x402 (test USDC when this server is set to base-sepolia), within this server's per-session and per-day spend caps. Only a 200 answer is charged; 400, 404 and 422 are free. Set dryRun to true to check for free whether this would be answered and what it costs; nothing is signed. If unsure what is covered, call check_coverage first (free). Not every answer is chef-verified: say "chef-verified by Cristopher" only when the result's label says exactly that; otherwise say it is not chef-verified. A refusal is final: don't rephrase the question to get around it.
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": {
"ingredient": "<ingredient>",
"portions": "<portions>",
"portionSize": "<portionSize>",
"currency": "<currency>"
},
"name": "calculate_amount_to_buy"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dryRun | No | Free quote only: check whether this would be answered and what it costs. Nothing is signed or charged. | |
| currency | Yes | The user's 3-letter currency code, e.g. AUD, USD, GBP. Display only. | |
| portions | Yes | How many portions to buy for. | |
| sellPrice | No | Menu price of one portion, excluding GST/VAT/sales tax. Needs pricePerKg or pricePerLb (400 without). | |
| ingredient | Yes | ||
| pricePerKg | No | Price per kg as bought. Not with pricePerLb. | |
| pricePerLb | No | Price per lb as bought. Not with pricePerKg. | |
| portionSize | Yes | Weight of one portion as served — cooked when the chef has a cook-loss range for the ingredient, otherwise trimmed raw (the response's `basis` says which). portions × portionSize is at most 10 t. |