Cost per serving
cost_per_servingTotal the cost of a recipe's ingredients and work out the cost per serving and per 10 servings. Use when budgeting a dish, pricing meal prep or comparing recipes on cost. Do NOT use to resize the recipe (use scale_recipe first, then price the scaled amounts here).
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": {
"ingredients": "<ingredients>",
"servings": "<servings>"
},
"name": "cost_per_serving"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| currency | No | Currency code for display only, e.g. 'EUR'; default USD | |
| servings | Yes | How many servings the recipe makes, positive, e.g. 4 | |
| ingredients | Yes | Priced ingredients, e.g. [{"item":"chicken","cost":8.5},{"item":"rice","cost":1.2}] |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | Yes | Plain-language cost summary | |
| currency | Yes | Currency code used in the results (upper case) | |
| servings | Yes | Servings the recipe makes | |
| total_cost | Yes | Sum of all ingredient costs | |
| per_serving | Yes | Cost per serving, rounded to cents | |
| per_ten_servings | Yes | Cost for 10 servings, rounded to cents |