Simple Inventory Management
io.github.dustout/simple-inventory-management
Read and update live small-business inventory, suppliers, reorder suggestions and purchase orders.
- add_inventory_unit — Adds a stock line to an inventory item. Provide inventory item id, name, optional identifier (serial, lot code, or other label), quantity (default 1), and status (InStock, Ordered, Outbound, Damaged).
- convert_quote_to_order — Convert a sales quote into a sales (outbound) order once the customer accepts it. Item lines become order lines and reserve the stock (the outbound amount goes up); the quote is marked Accepted and li
- create_new_inventory_item — Create a new inventory item by name, and return the object with the id of the new inventory item. Pass an optional unit of measure (e.g. "kg", "lb", "g", "ml", "L") for items tracked by weight or volu
- create_order — Create a new order for the company. Use Type "Inbound" to restock items from a supplier (the default) or "Outbound" to ship items out. Supply a name and the line items to order (each line is an invent
- create_quote — Create a sales quote (estimate) for a customer. A quote never changes inventory. Each line is either an inventory item (inventoryItemId from get_inventory; the price defaults to the item's salePrice,
- create_supplier — Create a supplier for the company by name (other contact details optional). Returns the new supplier id.
- delete_inventory_item — Delete a given inventory item by Id. Returns true if success.
- edit_inventory_item — Edit an existing inventory item. If field is not to be changed then leave null. Id field is required. Counts are absolute new values in the item unit of measure (decimals allowed, e.g. 2.5 for 2.5 kg)
- edit_inventory_item_name — Edit the name of an existing inventory item by Id
- find_item_by_barcode — Find an inventory item by its barcode (UPC, EAN, or Code 128 / SKU value) within the user's company. Returns the matching item or an error if none matches.
- find_units_by_custom_field — Finds stock lines across the company where a unit custom field matches a value (case-insensitive contains). Use for lot recalls: fieldName "Lot #" and value "abc123". Returns item name, unit id, quant
- generate_purchase_orders — Create draft inbound purchase orders for every item at or below its reorder point, grouped by preferred supplier. Returns how many orders and lines were created. The orders are drafts; complete them i
- get_image_upload_link — Creates a one-time upload link for an inventory item's photo or the company logo, valid for 15 minutes and for one upload. Best for full-size photos. Two ways to use it: (1) if you can run code and yo
- get_inventory — Gets all items in inventory that belong to the users company. Inventory items have a name, id, value (MSRP is the unit cost), salePrice (selling price, may be null), stock, and other parameters. Quant
- get_inventory_item_custom_fields — Gets the custom field values set on a given inventory item by its id. Returns each field's name, value, and whether it is shown as a column in the inventory table.
- get_reorder_suggestions — List inventory items that are at or below their reorder point, with the suggested quantity to order (in the item unit of measure when it has one) and the preferred supplier.
- list_custom_fields — Lists the reusable custom field definitions for the user's company. Custom fields hold extra per-item details such as lot number, expiry date, serial number, color or bin location. Call this before se
- list_deleted_inventory_items — Lists the inventory items that were deleted in the user's company, newest first, with when and by whom. Deleted items keep their history and can be brought back with restore_inventory_item.
- list_inventory_units — Lists the stock lines of an inventory item by its id. Each line has a name, optional identifier (serial), quantity, status (InStock, Ordered, Outbound, Damaged), and may hold unit custom fields such a
- list_quotes — List the company's sales quotes, newest first, with number, status (Draft, Sent, Accepted, Declined; a Draft or Sent quote past its valid-until date is reported as Expired), customer, totals and lines
- list_suppliers — List the company's suppliers (id, name, email, phone, lead time in days).
- list_unit_custom_fields — Lists custom field values on a stock line (inventory unit) by unit id. Use for lot number, expiry, and other per-line attributes.
- move_inventory_unit_quantity — Moves a quantity from a stock line to another status. If quantity is less than the line's quantity, the line is split (lot/custom fields are copied onto the new line). Use this for partial ship/receiv
- remove_inventory_item_custom_field — Removes a custom field value from an inventory item by item id and field name. The reusable field definition itself is left in place for other items. Returns true if a value was removed.
- remove_inventory_unit — Removes a stock line by its unit id. The parent item's stock totals are recomputed from remaining lines. Returns true if a line was removed.
- restore_inventory_item — Restores a deleted inventory item by Id (see list_deleted_inventory_items), with its counts, units, custom field values and history. Order lines and assembly parts removed by the delete are not restor
- set_image_from_base64 — Sets an inventory item's photo or the company logo from a small image sent inline as base64. Use this for a photo the user pasted into the chat when you can run code on the file but your sandbox can't
- set_image_from_url — Sets an inventory item's photo or the company logo from an image on the web (for example a manufacturer's product photo). The server downloads the image itself, so nothing large passes through the con
- set_inventory_item_custom_field — Sets (creates or updates) a custom field value on an inventory item. Provide the inventory item id, the field name (an existing field with that name is reused, otherwise a new field is created for the
- set_inventory_item_custom_field_by_name — Sets (creates or updates) a custom field on an inventory item referenced by its name instead of its id, so you can act on a request like "set the roast level for regular beans to Dark" in one step. Pr
- set_inventory_unit_identifier — Sets (or changes) the identifier of a stock line by its unit id. The identifier is a free-form label: serial number, asset tag, lot code, or similar. Pass an empty value to clear it. Does not change q
- set_inventory_unit_status — Sets the status of an entire stock line by unit id (moves the full quantity). Status accepts InStock, Ordered, Outbound or Damaged. For moving only part of a line's quantity, use move_inventory_unit_q
- set_unit_custom_field — Sets (creates or updates) a custom field on a stock line by unit id. Field names are reused company-wide; new names are created with Unit scope. showInTable shows the field as a column on unit lists.
- take_inventory_snapshot — Take a reconciliation snapshot of the company's current inventory. This captures the current count, on-order, damaged, in-use, and value of every inventory item at this moment in time so it can be rev