Skip to main content
Glama

Reorder Recommendations

get_reorder_recommendations
Read-only

What should I reorder? Returns the tenant's reorder decision (the one its reorder and transfer sweeps propose with, and the item page shows) as actionable recommendations in three buckets: purchase orders (buy from vendor, grouped-ready via defaultSupplier), manufacturing orders (make internally: manufactured items and sub-assemblies), and transfers (move stock to a 3PL/FBA node, capped at what the source warehouse can give: transferSourceWarehouseName, transferSourceShortfall). Most-critical first. By default each warehouse is decided with the look-ahead of the sweep that proposes for it (the gap to its next run, or none before a sweep owns proposals), so the answer matches the item page and the inbox (matchesReorderDecision). Pass includeForecastProjection/horizonDays only for a what-if look further ahead: items ON TRACK to breach their reorder point within horizonDays. Each bucket is paged independently by limit + offset and reports its pre-paging Total, so recommendations past the first page are reachable on large tenants. Renders the Reorder Decision Board with available stock, days on hand, suggested quantities, and sourced purchase lead times. Days on hand is available ÷ the planning rate (forecast, sales history and production pulls), the same figure the item page and get_item_stock_outlook show. Call this directly for low-stock/reorder questions; do not open onboarding or readiness first. Missing data is shown in a collapsed improvement section, and unknown coverage stays null rather than zero. A purchase recommendation an open draft PO already carries names that draft (openDraftPurchaseOrderNumbers): a draft is not on order until it is issued, so review or issue it rather than drafting the item again. withoutReorderPoint lists items with demand that NO bucket can include because they have no reorder point (hasReorderPointRow=false: no reorder-point row at that warehouse; pinned=true: set at 0 and never recalculated; otherwise a calculated reorder point still at 0; madeInHouse=true: an item built from its own bill of materials, which the daily build sweep plans once it has a row; atTransferNode=true: a warehouse supplied by transfer, whose row the transfer sweep creates), lowest days on hand first. When totalWithoutReorderPoint > 0 the buckets are not the whole answer: say how many items are left out and why, name the most urgent, and offer to set their reorder policy (set_inventory_policy). discontinued lists positions of discontinued items: they still sell but are never reordered, so they are left out of every bucket on purpose; mention them only to explain why an item is not recommended (transfers to a node still move a discontinued item's existing stock). decidedBy names, per warehouse, the Automation rule whose look-ahead decided the rows, its mode (observe/propose/autopilot) and lookAheadDays: when asked why an item does or does not need reordering, say which rule decided it and that its look-ahead is changed on that rule (update_rule), not on the item. defaultSupplierId is the supplier the item is bought from at that warehouse (the item's per-warehouse default supplier when set, else its default supplier).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_reorder_recommendations"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoPage size per bucket (default 50, max 200).
offsetNoZero-based row offset applied within each bucket for paging (default 0). Compare against the bucket's Total to know when the last page is reached.
supplierIdNoOptional vendor id (GUID). Keeps only purchase orders, and withoutReorderPoint items bought, whose default vendor it is. Manufacturing orders, transfers, and madeInHouse or atTransferNode items have no vendor, so they are listed whatever vendor is given.
horizonDaysNoWhat-if only: forecast look-ahead in days (turns on the projection). Omit to decide with the tenant's reorder look-ahead.
warehouseIdNoOptional warehouse id (GUID) to scope the sweep.
includeForecastProjectionNoWhat-if only. true flags items projected to breach their reorder point within horizonDays; false only items already below. Omit to decide with the tenant's reorder look-ahead.

Output Schema

NameRequiredDescriptionDefault
okNo
limitNo
offsetNo
decidedByNoPer warehouse in the returned rows: the rule, mode and look-ahead the decision was made with. Omitted for a what-if look-ahead and for a client-pinned credential.
transfersNo
supplierIdNo
horizonDaysNo
warehouseIdNo
discontinuedNo
purchaseOrdersNo
totalTransfersNo
totalDiscontinuedNo
manufacturingOrdersNo
totalPurchaseOrdersNo
withoutReorderPointNo
matchesReorderDecisionNo
totalManufacturingOrdersNo
totalWithoutReorderPointNo
includeForecastProjectionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed11 schema fields changed
    • addedOutput schema / properties / decidedBy
      Added value: +{
      +  "description": "Per warehouse in the returned rows: the rule, mode and look-ahead the decision was made with. Omitted for a what-if look-ahead and for a client-pinned credential.",
      +  "items": {
      +    "description": "What decides whether an item needs reordering at a warehouse: the Automation rule whose look-ahead the decision uses, its execution mode and the look-ahead in days. The look-ahead is set on the Automation page (/setup/automation), not on the item.",
      +    "properties": {
      +      "lookAheadDays": {
      +        "description": "Days of forecast demand the decision counts ahead; 0 means only stock already below the reorder point triggers.",
      +        "type": "integer"
      +      },
      +      "mode": {
      +        "description": "The rule's execution mode: observe (logs only), propose (drafts for approval) or autopilot (creates orders).",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "ruleId": {
      +        "description": "The rule to open or change on the Automation page (update_rule / get_rule). Null when source is none.",
      +        "format": "uuid",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "ruleName": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "source": {
      +        "description": "reorder_sweep (a buying warehouse's reorder sweep rule), transfer_sweep (a Transfer-mode node's reorder transfer rule) or none (no rule proposes orders here, so only a position already below its reorder point triggers).",
      +        "type": "string"
      +      },
      +      "warehouseId": {
      +        "format": "uuid",
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "type": [
      +    "array",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / manufacturingOrders / items / properties / defaultSupplierId / description
      Added value: +"The supplier the item is bought from at this warehouse: the warehouse's default supplier on the item when one is set, else the item's default supplier. Purchase orders the sweep drafts go to it."
    • changedOutput schema / properties / manufacturingOrders / items / properties / lookAheadDays / description
      Previous value: -"Days of forecast demand the decision looked ahead: the gap until the sweep that proposes for this warehouse next runs. 0 when it decided on the position now."New value: +"Days of forecast demand the decision looked ahead: the gap until the sweep that proposes for this warehouse next runs. 0 when it decided on the position now. The rule that sets it, and its mode, are in the response's decidedBy for this warehouse."
    • changedOutput schema / properties / manufacturingOrders / items / properties / purchaseLeadTimeSource / description
      Previous value: -"Lead-time evidence: ManualOverride, HistoricalAverage, SupplierDefault, PriceBookEstimate, TransferTransit, or ManufacturingLeadTime. SystemFallback is an unconfirmed estimate. Missing or unknown sources also require confirmation before order timing."New value: +"Lead-time evidence: ManualOverride, HistoricalAverage, SupplierDefault, PriceBookEstimate, TransferTransit, ManufacturingLeadTime, ItemGroupDefault or TenantDefault (the customer's own default, from get_replenishment_defaults). SystemFallback is an unconfirmed estimate. Missing or unknown sources also require confirmation before order timing."
    • addedOutput schema / properties / purchaseOrders / items / properties / defaultSupplierId / description
      Added value: +"The supplier the item is bought from at this warehouse: the warehouse's default supplier on the item when one is set, else the item's default supplier. Purchase orders the sweep drafts go to it."
    • changedOutput schema / properties / purchaseOrders / items / properties / lookAheadDays / description
      Previous value: -"Days of forecast demand the decision looked ahead: the gap until the sweep that proposes for this warehouse next runs. 0 when it decided on the position now."New value: +"Days of forecast demand the decision looked ahead: the gap until the sweep that proposes for this warehouse next runs. 0 when it decided on the position now. The rule that sets it, and its mode, are in the response's decidedBy for this warehouse."
    • changedOutput schema / properties / purchaseOrders / items / properties / purchaseLeadTimeSource / description
      Previous value: -"Lead-time evidence: ManualOverride, HistoricalAverage, SupplierDefault, PriceBookEstimate, TransferTransit, or ManufacturingLeadTime. SystemFallback is an unconfirmed estimate. Missing or unknown sources also require confirmation before order timing."New value: +"Lead-time evidence: ManualOverride, HistoricalAverage, SupplierDefault, PriceBookEstimate, TransferTransit, ManufacturingLeadTime, ItemGroupDefault or TenantDefault (the customer's own default, from get_replenishment_defaults). SystemFallback is an unconfirmed estimate. Missing or unknown sources also require confirmation before order timing."
    • addedOutput schema / properties / transfers / items / properties / defaultSupplierId / description
      Added value: +"The supplier the item is bought from at this warehouse: the warehouse's default supplier on the item when one is set, else the item's default supplier. Purchase orders the sweep drafts go to it."
    • changedOutput schema / properties / transfers / items / properties / lookAheadDays / description
      Previous value: -"Days of forecast demand the decision looked ahead: the gap until the sweep that proposes for this warehouse next runs. 0 when it decided on the position now."New value: +"Days of forecast demand the decision looked ahead: the gap until the sweep that proposes for this warehouse next runs. 0 when it decided on the position now. The rule that sets it, and its mode, are in the response's decidedBy for this warehouse."
    • changedOutput schema / properties / transfers / items / properties / purchaseLeadTimeSource / description
      Previous value: -"Lead-time evidence: ManualOverride, HistoricalAverage, SupplierDefault, PriceBookEstimate, TransferTransit, or ManufacturingLeadTime. SystemFallback is an unconfirmed estimate. Missing or unknown sources also require confirmation before order timing."New value: +"Lead-time evidence: ManualOverride, HistoricalAverage, SupplierDefault, PriceBookEstimate, TransferTransit, ManufacturingLeadTime, ItemGroupDefault or TenantDefault (the customer's own default, from get_replenishment_defaults). SystemFallback is an unconfirmed estimate. Missing or unknown sources also require confirmation before order timing."
    • addedOutput schema / properties / withoutReorderPoint / items / properties / defaultSupplierId / description
      Added value: +"The supplier the item is bought from at this warehouse: the warehouse's default supplier on the item when set, else the item's."
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Despite annotations already marking this as a safe read-only tool, the description adds substantial behavioral context: buckets are paged independently by limit and offset with pre-paging Totals, unknown coverage stays null, open draft POs are named rather than silently treated as on order, and discontinued items are excluded from every bucket with the reason given. It also explains the default sweep look-ahead behavior and how decidedBy identifies the automation rule responsible for each warehouse's rows.

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

Conciseness4/5

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

The description is front-loaded with the core purpose and bucket structure before moving into defaults, paging, and edge-case handling. It is dense and reads as a single long paragraph, but almost every clause carries a distinct operational rule needed to interpret the results correctly; better formatting could improve scanability without changing content.

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?

For a complex, multi-bucket recommendation tool with an output schema, the description is complete enough to guide correct use: it explains bucket semantics, paging behavior, default versus what-if look-ahead, exclusion cases, and follow-up actions. Nothing material about calling or interpreting the tool appears missing.

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

Parameters4/5

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

Schema description coverage is 100%, so the baseline is 3. The description adds meaningful semantics beyond the schema by explaining that limit and offset page each bucket independently and that each bucket reports a pre-paging Total, and by framing includeForecastProjection and horizonDays as strictly what-if controls. It does not add much beyond the schema for supplierId or warehouseId, keeping this below a 5.

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?

The description states a specific verb and resource: it returns the tenant's reorder decision as actionable recommendations in three named buckets (purchase orders, manufacturing orders, transfers). It also clearly distinguishes this from adjacent workflows by saying to call it directly for low-stock/reorder questions rather than opening onboarding or readiness first.

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?

It gives explicit usage guidance: call this directly for low-stock/reorder questions, use includeForecastProjection/horizonDays only for what-if look-ahead, and handle the no-reorder-point case by offering set_inventory_policy. It also explains when to point the user to update_rule for changing look-ahead rather than changing the item.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources