recipe-scale
Recipe scaling with caller-declared non-linear rules — Scales up to 60 ingredient quantities by a servings ratio or a factor for an agent resizing a recipe or batch formula, applying per-ingredient rules the caller declares: linear (the labelled default), power exponent, fixed amounts, min/max clamps and rounding steps, with an optional display unit via unit-convert. Reports what rounding did (relative drift, rounds-to-zero). It does NOT know which in
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>"
},
"name": "recipe-scale"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| factor | No | Scale factor, instead of fromServings/toServings. | |
| density | No | Default density for displayUnit conversions that cross mass and volume. | |
| toServings | No | Servings wanted. | |
| ingredients | Yes | Ingredients with quantity, unit and optional scaling rule. | |
| fromServings | No | Servings the recipe is written for. | |
| maxRelativeDrift | No | Fail an ingredient when rounding moves it by more than this fraction (0.1 = 10%). |