Skip to main content
Glama
smeet666

mcp-wikibooks-cookbook

Rescale an ingredient list

scale_ingredients
Read-onlyIdempotent

Rescale any ingredient list to a new serving count or factor. Handles weights, countable items, approximations, and alternatives, adjusting units to avoid rounding away tiny amounts.

Instructions

Rescale a list of English ingredient lines. This contacts no website and works on a list from anywhere, including one the user pasted in. Give either 'factor' directly, or 'from_servings' and 'to_servings' and the factor is computed. Grams, millilitres, ounces and pounds are multiplied and rounded to what a scale can show; a quantity that would fall below one is moved to a smaller unit first, so it never rounds away to nothing. Countable things land where a kitchen can follow, and what decides is the content rather than the container: a can, a packet, a sheet of gelatine or a spoon lands on a half, because half of one pours, weighs or cuts. An egg, a yolk, a white, a zest or a whole clove lands on a whole one, since there is no half of it to measure out, which is what stops an answer like '2.4 eggs'. A bottle, a jar, a block and a slice go one step further, to the quarter, as a whole food a knife shares out does. An approximate measure is scaled as a count, so a pinch taken from 6 servings to 25 is 4 pinches; the note gives the everyday equivalence, and the quantity stays in the unit the line used. That covers the gestures, such as a pinch, a dash, a glug or a handful, and anything named after what holds it, such as a capful or a spoonful. A line with no quantity at all comes back untouched and flagged. A bracketed equivalent, as in '450 g (1 pound)', is scaled with the amount it restates rather than left to contradict it, and so is one written after a slash, as in '500 g / 1.1 lb'. A line offering a choice, as in '2 tablespoons butter OR 30 g margarine', has both branches scaled, so whichever one the cook takes carries the same share. Prefer this over doing the arithmetic yourself.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
factorNoMultiplier to apply. Use this or the from/to pair.
ingredientsYesIngredient lines, for example ['450 g (1 pound) spaghetti', '5 egg yolks', 'Salt'].
to_servingsNoHow many servings are wanted.
from_servingsNoHow many servings the list is written for.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
notesYes
factorYes
ingredientsYes
scaled_countYesLines whose arithmetic came out exact.
rounded_countYesLines whose value was moved to stay usable, not lines that could have been.
unscaled_countYesLines carrying nothing that can be multiplied.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv2.1.0
    • removedOutput schema / properties / ingredients / items / properties / amount / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / ingredients / items / properties / amount / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / ingredients / items / properties / amount_max / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / ingredients / items / properties / amount_max / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / ingredients / items / properties / unit / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / ingredients / items / properties / unit / type
      Added value: +[
      +  "string",
      +  "null"
      +]
  2. Changed1 schema field changedv1.3.0
    • changedOutput schema / properties / ingredients / items / properties / scaling / description
      Previous value: -"'scaled' means the arithmetic was exact. 'rounded' means a countable item was moved to a whole or half unit, or a measurement was demoted to a smaller unit to stay usable. 'unscaled' means the line carries nothing that can be multiplied and was left alone."New value: +"'scaled' means the arithmetic was exact. 'rounded' means a countable item was moved to a whole, a half or a quarter, whichever is the smallest share a cook takes out of one of it, or a measurement was demoted to a smaller unit to stay usable. 'unscaled' means the line carries nothing that can be multiplied and was left alone."
  3. Changed1 schema field changedv1.2.0
    • addedInput schema / additionalProperties
      Added value: +false
  4. First observedv1.0.0

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description goes far beyond the annotations. It discloses rounding behavior (rounded to what a scale can show), unit conversion (moving to smaller units to avoid rounding away), handling of countable items (eggs, yolks, cloves land on whole numbers), approximate measures (pinch, dash, glug scaled as counts), lines with no quantity (returned untouched and flagged), bracketed equivalents, slash-separated equivalents, and OR-choice branches. This is exceptionally transparent about edge-case behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but every sentence earns its place by explaining a distinct behavioral rule. It front-loads the core purpose and the key invocation modes, then systematically covers edge cases. It is not a tautology or filler; it is dense with useful information. The length is justified by the complexity of the tool's behavior, though it could be slightly tightened without losing meaning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity and the presence of an output schema, the description is remarkably complete. It covers input modes, rounding rules, unit handling, special cases (no quantity, equivalents, choices), and even tells the agent when to prefer this tool over manual arithmetic. The output schema exists, so return values need not be described. Nothing an agent needs to call this tool correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description adds meaningful semantics beyond the schema: it explains the relationship between 'factor' and the 'from_servings'/'to_servings' pair, and clarifies that the factor is computed when the pair is given. It also explains how the ingredients parameter is interpreted (English lines, any source). It doesn't add syntax details for each parameter, but the schema already covers those, and the description adds the decision logic for choosing between the two modes.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: 'Rescale a list of English ingredient lines.' It immediately distinguishes itself from sibling tools (get_recipe, search_recipes, list_recipes) by stating it works on a list from anywhere, including user-pasted text, and explicitly says 'Prefer this over doing the arithmetic yourself.' The purpose is unmistakable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states when to use this tool: rescale an ingredient list, and contrasts it with alternatives by noting it contacts no website and works on a list from anywhere. It also gives clear guidance on how to invoke it: provide either 'factor' directly or 'from_servings' and 'to_servings'. The final sentence 'Prefer this over doing the arithmetic yourself' is a direct usage directive.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.