Skip to content

Tool Reference

This page describes what each tool is for — its purpose, when an agent should reach for it, and any side effects. It deliberately does not enumerate every parameter: your MCP client receives the full, authoritative parameter schema from the server automatically, and that schema is the source of truth. Only the inputs that matter for understanding a tool are called out here. Ids are prefixed (see Vocabulary).

Fuzzy (case-insensitive substring) search across SKUs, products, suppliers, locations, categories, and collections. The right first step to turn a name the user typed into an id you can pass to other tools. Optionally restrict to specific entity types.

Enumerate the full set of a small entity type — suppliers, locations, categories, collections — when you need everything rather than a fuzzy match.

Point lookup of a single entity by id. The id prefix encodes the type, so the type usually doesn’t need to be specified separately. A tr_… id returns the transfer with its lines — each carrying the line_id that update_transfer takes — and a po_… id returns the PO with its lines.

Current stock state and derived metrics, at a configurable grain (sku, product, or sku_location). Supports structured filters and sorts over fields like current_stock, days_left_min and stock_health. Use it to answer “what’s low / overstocked / out of stock”.

List purchase orders with rich filters (status, supplier, creation-date window, tags, type). Pass expand=["lines"] to include line detail — that’s how you get the line_ids needed to edit or receive against a PO. Deleted POs are never returned.

List stock transfers between locations with filters for status, source / destination location, name and date windows. Rows are headers only — pass a tr_… id to get_entity for the lines. A name_contains search needs at least 3 characters; a shorter one is rejected rather than answered with every transfer. Date and timestamp filters are UTC — give updated_after an offset and it is converted, give it none and it is read as UTC. Transfers outside your location permissions are never returned.

Forecasted demand for the next 12 months, bucketed by month, grouped by sku by default. Use it to read the demand plan; update_forecast_plan changes it.

Pre-computed insight cards — stock-out risk, late POs, excess inventory, best sellers stock, and similar. The fastest way to surface “what needs attention” without assembling it from raw search results.

Audit trail: who changed what, when, with old → new values. Works scoped to a single entity — purchase orders, stock arrivals, SKUs, suppliers, locations, products, location transfers, stock takes, shipments, forecasts and tags — or as a tenant-wide feed.

Generate a downloadable PDF / XLSX export of a single PO and return a public URL.

All write tools — the purchase-order, SKU-settings, forecast and transfer tools — share one response envelope and a few behaviours worth understanding. Exact response fields come from the live tool results; these are the concepts.

  • Preview, then apply. Every write tool accepts dry_run. With dry_run=true it runs full validation and returns a preview of the projected effect without writing anything. The recommended pattern is always to preview, show the user, then re-issue the same call with dry_run=false.
  • Partial outcomes. Writes are best-effort, not transactional. A batch can have some items succeed and others fail — the result tells you which. If a problem is caught before anything is written, nothing changes and you can retry the whole batch; if some items already committed, only re-try the failed ones (re-sending the successes would duplicate them).
  • Lost answers. A write whose answer never arrives is not reported as “nothing written”. The transfer tools re-read the record to see what landed; anything that still cannot be settled comes back with retryable: false and an unknown affected_count, so read the record before sending it again.
  • Reversibility. receive_po_units and receive_transfer_units are reversible via received_quantity — quantities are deltas, so a negative quantity backs out a previous receipt. mark_as_received and is_closed are not deltas and are not undone by a negative quantity. Reverting a placed PO to an earlier status is destructive (it resets received units) and surfaces a destructive: warning first. The same applies to reverting an ordered transfer. update_forecast_plan is not reversible — see its caution below.
  • Renamed parameters. update_purchase_order, receive_po_units and export_purchase_order take purchase_order_id; the former po_id is deprecated and still accepted until the next release. Sending both is rejected. receive_units is receive_po_units’s deprecated former name — the tool itself is unchanged, only the name; use receive_po_units in new integrations.
  • Auditing. Every write is recorded in Prediko’s audit log and attributed to you, the real caller (see Actor attribution). Each result carries an audit_id — quote it when reporting an issue.

Create a new purchase order from a supplier, a destination location, and a set of lines (each a SKU + ordered_units).

Apply header and/or line changes to an existing PO. Line edits use an action model — update, add, or remove — keyed by line_id (from search_purchase_orders with expand=["lines"]). Delivery dates are per-line, so they are set on an update line rather than on the PO header.

Record received quantities against PO lines when stock arrives. Each line sets one or more of received_quantity, mark_as_received, is_closed — except received_quantity and mark_as_received together, which are mutually exclusive on the same line.

Batch-update SKU planning attributes: reorder_status (whether the SKU is included in re-order planning), lead_time_days, moq, and the coverage alert window.

Apply manual overrides to demand-plan cells — one value per (item, period), or per (item, location or store, period) when the plan is split — when a human judgement (a promotion, a delisting, a known one-off) should replace the forecast for specific periods. The split defaults to overall (the item across every location); pass split_type: "location" or "store" with a matching split_id to override one split instead. Read the plan with search_forecasts first. All cells in one call must share the same item level and split; each cell must cover exactly one calendar month, quarter or week (start on the period’s first day, end on its last day), and every cell in the call must resolve to the same one of those three. A week ending on the first day of a month spans two months and is not supported yet — use a monthly cell for that period. Send a coordinate once: two values for the same item, split and period are rejected rather than applied in an arbitrary order.

Create a stock transfer from a source location; each line names its SKU, ordered_units and destination location, so one transfer can feed several locations. It lands in draft; nothing moves until you place it with update_transfer(patch: {status: "ordered"}). Units are capped at the stock available at the source — capped lines are reported in warnings. The source and every destination must be within your location permissions — an out-of-scope location is refused, never silently dropped. Prediko does not report which end was out of scope, so the error names both.

Header, status and line edits to a transfer: name, notes, tracking number, due date, status, and update / add / remove lines keyed by line_id (from get_entity). New lines must name their destination_location_id and whole-number ordered_units, and can only be added while the transfer is still draft, sent_for_approval or approved — once it is placed, create a new transfer for the extra units. A newly added line’s ordered_units is capped at the stock available at the source and capped lines are reported in warnings; changing an existing line’s ordered_units is stored exactly as sent. A patch-level confirmed_delivery_date covers every line including ones added in the same call, and a per-line confirmed_delivery_date overrides it.

patch.status moves the transfer between draft, sent_for_approval, approved and ordered, and is applied after the header and line changes in the same call — so one call can add a line and place the transfer. ordered places it: its units count as in transit and, for transfers managed in Prediko, are reserved at the source location.

Record received quantities against stock-transfer lines when units arrive at the destination. Each line sets one or more of received_quantity, mark_as_received, is_closed — the same three fields receive_po_units takes, applied to a transfer’s lines (line_id from get_entity) instead of a PO’s — with the same restriction that received_quantity and mark_as_received are mutually exclusive on a line.

How the tools compose into real tasks. Each step is a tool call; arguments come from the live schemas.

  • Restock a low SKU. find_entity to resolve the SKU → search_inventory to check stock (low days_left, no incoming_units = reorder) → find_entity / list_entities for the supplier and location → create_purchase_order. The PO lands in draft — the supplier is not contacted automatically.
  • Receive a delivery. search_purchase_orders with expand=["lines"] to get each line_id → receive_po_units. Quantities are deltas — send a negative quantity to reverse a mistaken receipt.
  • Receive a transfer. get_entity on the transfer to get each line_id → receive_transfer_units.
  • Audit and fix re-order status. search_inventory with a reorder_status = false filter to list everything currently excluded from re-order planning → update_sku_settings with patch: {reorder_status: true} to put the ones that should be replenished back. Preview with dry_run: true first — the write triggers a stock-health and forecast recompute.
  • Tune restock thresholds in bulk. One update_sku_settings call with an array of per-SKU patches. If one patch is invalid (e.g. safety_stock_days > days_of_cover) the whole batch reports validation_failed and nothing is written — fix it and retry.
  • Move stock between locations. list_entities for the two locations → search_inventory at sku_location grain to pick the SKUs and quantities → create_transfer (lands in draft) → update_transfer with patch: {status: "ordered"} to place it. get_entity on the tr_… id shows the lines and what has arrived.

The same concept uses the same name across every tool:

TermMeaning
current_stockOn-hand units. Can be negative after returns / voided orders — treat negatives as data, not errors.
days_leftHow long current stock lasts at the current sales rate. Returned as {min, max} at sku/product grain, scalar at sku_location grain. Sort/filter use days_left_min / days_left_max.
safety_stock_days / days_of_coverThe coverage targets days_left is judged against. Written with update_sku_settings.
stock_healthStock status today: NO_STOCK, BELOW_SAFETY_STOCK, OVER_SAFETY_STOCK, OVER_DAYS_OF_COVER. Filtering it at sku/product grain matches a row when any of its locations has that status, even though the row shows the worst status across locations — use granularity: "sku_location" to match a location’s exact status.
stock_health_projectedThe risk over the forecast horizon: STOCKOUT_LIKELY, AT_RISK, NO_RISK, OVERSTOCK_RISK. Same grain caveat as stock_health: a sku/product-grain filter matches on any location, while the row shows the worst status.
incoming_unitsUnits on open purchase orders headed for the location.
ordered_units / received_unitsUnits on a purchase order or stock transfer line, and how many of them have arrived.
line_idThe handle for one line of an order. oprt_… on a purchase order, tprt_… on a stock transfer. Purchase-order tools also still accept the former name order_part_id until the next release.
is_lateWhether an order is overdue: its earliest expected delivery has passed and it is still expecting stock. On purchase orders and stock transfers alike.
confirmed_delivery_dateWhen a PO line’s units are due to arrive. Stored per line. create_purchase_order accepts one date and applies it to every line; update_purchase_order sets it per line.
unit_costThe last purchase cost per unit — not a landed cost. bom_cost is the sum of component costs for bundles/assemblies.
reorder_statusWhether the SKU is included in re-order planning. Boolean at sku/sku_location grain, a {yes, no} SKU counter at product grain. Read with search_inventory / get_entity, write with update_sku_settings.

Every id carries a type prefix, so the type is always visible at a glance:

PrefixEntity
sku_…SKU
prod_…Product
sup_…Supplier
loc_…Location (the app’s Locations)
po_…Purchase order
oprt_…Purchase order line (the line_id write tools take)
tr_…Stock transfer between locations
tprt_…Transfer line (the line_id write tools take)
cat_…Category
coll_…Collection
audit_…Change-history entry