dishmath

v0.1.0
io.github.CloudCorpRecords/dishmath Checked 30 minutes ago Published 27 days ago

Local restaurant math: food cost, menu price with VAT, recipe scaling and the EU allergen matrix.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

food_cost_calculator

Cost of a dish from its ingredients, the price that hits your target food cost %, and your actual food cost % at the current price.

ParameterTypeDescription
ingredients *arrayThe ingredients for this call.
currencystringCurrency code, e.g. USD.
current_pricenumberCurrent price value.
target_food_cost_percentnumberThe target food cost percent for this call.

menu_price_calculator

From plate cost and target food cost: net price, price including VAT, menu price rounded up to a clean step, gross profit and real food cost after rounding.

ParameterTypeDescription
plate_cost *numberCost per plate.
target_food_cost_percent *numberThe target food cost percent for this call.
currencystringCurrency code, e.g. USD.
rounding_stepnumberRounding step size.
vat_percentnumberVAT percentage.

recipe_scaler

Scale a recipe from N to M portions. Returns every scaled quantity, plus batch cost and cost per portion when unit costs are given.

ParameterTypeDescription
ingredients *arrayThe ingredients for this call.
original_portions *numberOriginal number of portions.
target_portions *numberTarget number of portions.
currencystringCurrency code, e.g. USD.

allergen_matrix

The dish × allergen table required in the EU (Reg. 1169/2011, Annex II), with the dishes to avoid for each allergen. Accepts English, Italian or common names.

ParameterTypeDescription
dishes *arrayDishes payload.