Yield and cost from a purchase (paid, $0.01)
calculate_yield_and_costCalculate usable and cooked yield plus cost per kg and per portion from an ingredient's purchased weight and price, so you can turn trim and cook loss into portion costs.
Instructions
Raw vs cooked weight and cost per portion: what a brisket, lamb leg or snapper yields after trim and cook loss, from head chef Cristopher's verified ranges. Send ingredient, weight bought, price paid, optional portions; get usable and cooked weight (best/mid/worst), cost per kg and per portion, with workings. 30+ items: beef, lamb, pork, chicken, seafood, vegetables, fruit. Refused, never guessed: allergen, curing and preserving terms. Only a 200 answer is charged; refusals and 404s are free.
Use when the user already bought, or has priced, a weight of one ingredient and wants what it yields and the cost per portion. For "how much do I need for N people", use calculate_amount_to_buy instead. ingredient must be an exact listed name or alias (others get a free 404 with suggestions). price is the total paid for purchased, not a price per kg. Give either portions (split the yield into N) or portionSize, not both. 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>",
"purchased": "<purchased>",
"price": "<price>",
"currency": "<currency>"
},
"name": "calculate_yield_and_cost"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| price | Yes | Total paid for the purchased quantity. | |
| 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 | No | Split the yield into this many portions: cooked when the chef has a cook-loss range for the ingredient, otherwise trimmed raw (`basis` says which). Not with portionSize. | |
| purchased | Yes | Between 1 g and 10 t in total (0.0353 oz to 22,046 lb; lb and oz are converted exactly). | |
| ingredient | Yes | ||
| portionSize | No | Weight of one portion as served: cooked when the chef has a cook-loss range for the ingredient, otherwise trimmed raw (`basis` says which). Not with portions. |