Ask Claude how much flour is left: measured inventory over MCP
When an AI assistant reads your inventory over the built-in MCP server, it gets back a list of items with names, costs and counts. Until now a count was a whole number with no unit attached, which was fine for chairs and awkward for flour. Ask “how much flour is left” and the honest reply was “12”, followed by a guess about whether that meant bags, kilos or pounds.
With units of measure every quantity the server returns is a decimal, and every item carries its unit. The assistant no longer has to guess. Here is what that looks like in a conversation, and what changed in the tools for anyone who likes to know.
A morning at the bakery
Nothing in that exchange needed a conversion or a clarifying question. The assistant read
12.75 and kg from the same item, read the assembly component in kilos, and
wrote the new stock value back in the same unit. The history on the item shows the 4.5 kg subtraction
with a robot marker next to it, like any other change made over MCP.
Questions that only make sense with a unit
- “Which items measured in litres are below their warning level?”
- “How many loaves can the current flour stock make?” (the assistant reads the assembly, or does the division itself)
- “Convert the reorder suggestions to sacks, assuming a sack is 25 kg.” The app does not convert, but the assistant happily will, and it will say so.
- “Create an item called Casting resin, tracked in ml, and set its warning level to 250.”
- “We received 3 drums of cable at 100 m each. Add 300 m to the 6 mm armoured cable.”
The general list of questions still applies; these are the ones that were impossible to answer well before the unit travelled with the number.
What changed in the tools
If you use the MCP server from your own client or script, three things are different.
-
Quantities are decimals.
inventoryCount,onOrderCount,toShipCountanddamagedCountonget_inventoryandedit_inventory_itemaccept and return values like12.75. Integer clients keep working; a count of12is still12. -
Items carry a
unit. It isnullfor items counted in pieces and a short label (kg,lb,ml,ft, or whatever you typed) for measured ones.edit_inventory_itemcan set it, andcreate_new_inventory_itemtakes an optionalunit. -
Related tools follow. Order lines on
create_order, stock lines on the unit tools andget_reorder_suggestionsall report decimals, and reorder suggestions include the item’s unit so a suggested 50 reads as 50 kg.
The tool descriptions say all of this too, which matters more than it sounds: an assistant reads the description before it calls the tool, so it knows up front that a count on a measured item is in that item’s unit and that setting a unit does not convert anything.
What it does not do
The server never converts between units. If you ask the assistant to “change flour to pounds”, it will change the label and, if it is being careful, tell you the number did not change. That is the same rule the app applies to people, for the same reason: a silent conversion is a great way to end up with 22 kg of flour that is really 10. Ask for the conversion explicitly and let the assistant do the arithmetic in the conversation, then confirm the new count.