Skip to main content
Glama
smeet666

mcp-wikibooks-cookbook

Rescale an ingredient list

scale_ingredients
Read-onlyIdempotent

Rescale recipe ingredient quantities to match any serving size or multiplier, handling units, approximate measures, and whole items so measurements stay practical.

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.
Behavior5/5

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

Discloses a wealth of behavioral traits beyond annotations: no website contact, rounding to scale readability, unit conversion to avoid rounding to zero, and handling of countable vs measurable items. Also covers bracketed equivalents, slash alternatives, OR branches, and flagging no-quantity lines. This far exceeds what the readOnly/idempotent annotations provide.

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

Conciseness5/5

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

Although detailed, the description is carefully structured: purpose, input options, rounding behavior, special cases, and a closing recommendation. Each sentence provides a distinct, actionable rule with no filler. Length is appropriate for the tool's complexity.

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?

Covers base scaling, rounding, unit conversions, countable/uncountable logic, syntactic variations, and no-quantity handling. With an output schema available, it doesn't need to explain return values, yet it even previews the flag for no-quantity lines. Siblings are unrelated to scaling, so no cross-reference is needed.

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

Parameters5/5

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

Schema covers all four parameters, but description adds critical semantics: which parameter combination to use (factor vs from_servings/to_servings) and that the factor is computed from the servings pair. It also clarifies that ingredient lines need not come from a recipe database. This is a strong supplement to the schema.

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?

Opens with a specific verb+resource: 'Rescale a list of English ingredient lines.' It clearly distinguishes from sibling recipe search/list/get tools, and explicitly says to prefer this over doing 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?

States when to use the tool: works on a list from anywhere, including pasted input. Provides explicit input mode guidance ('Give either factor directly, or from_servings and to_servings') and names the alternative (doing arithmetic yourself). This is explicit when/when-not guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/smeet666/mcp-wikibooks-cookbook'

If you have feedback or need assistance with the MCP directory API, please join our Discord server