AI

Ask Claude how much flour is left: measured inventory over MCP

Published · 6 min read

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.

Package Pal chatting with an AI assistant on a laptop about stock levels.
The assistant reads the unit with the number, so the answer comes back in kilos.

A morning at the bakery

Claude · connected to Simple Inventory Management company: Northside Bakery
How much bread flour do we have, and is it enough for today?
get_inventory
You have 12.75 kg of bread flour in stock, with another 50 kg on order. Your warning level is 20 kg and your critical level is 10 kg, so the row is already yellow. At the 0.5 kg per loaf in your Sourdough loaf assembly, that is enough for about 25 loaves before you dip into the critical zone.
We just used 4.5 kg for the first batch. Log it.
edit_inventory_item
Done. Bread flour is now 8.25 kg, which is below your critical level of 10 kg. A low-stock alert has gone to your Teams channel. Do you want me to check whether the 50 kg on order has a delivery date?
Yes, and add 2 L of olive oil to the same order if it hasn’t shipped.
create_order
The order “Mill delivery, week 44” is still pending. I added a line for 2 L of olive oil, so the order now has 50 kg of bread flour and 2 L of olive oil on it.

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, toShipCount and damagedCount on get_inventory and edit_inventory_item accept and return values like 12.75. Integer clients keep working; a count of 12 is still 12.
  • Items carry a unit. It is null for items counted in pieces and a short label (kg, lb, ml, ft, or whatever you typed) for measured ones. edit_inventory_item can set it, and create_new_inventory_item takes an optional unit.
  • Related tools follow. Order lines on create_order, stock lines on the unit tools and get_reorder_suggestions all 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.

Not connected yet? The setup guide takes about four steps, and access is scoped to one company and revocable at any time. Works with Claude, Grok, OpenAI, Gemini and any other MCP client.

Connect an assistant to your stock