Skip to main content
Glama
48x-ai

@marketbasketanalysis/mcp

by 48x-ai

predict_reorder

Predict when B2B customers will reorder each SKU, using order history to flag overdue, due soon, or on-track items for proactive replenishment and stockout risk management.

Instructions

For a sales-rep or inventory / account-management agent: predict when a B2B customer / account is due to reorder. Returns predicted next-order dates for every SKU the customer has ordered >=2 times, with confidence based on the regularity of their cadence (reorder prediction / replenishment forecasting). Bucketed into 'overdue' / 'due_soon' / 'on_track' / 'not_predictable'. Use this when the agent asks 'what's Acme Corp due to reorder?', 'when will customer X need more of Y?', 'show me stockout risks for my B2B accounts', or for proactive replenishment workflows. Works on the Shopify, BigCommerce, WooCommerce, and Magento backends. Not available on OroCommerce.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
product_idNoOptional: filter to a single product. Useful for 'when will customer X reorder product Y?'.
customer_idYesThe customer id on the store's own platform. Shopify accepts either the numeric storefront id (e.g. '7654321') or the full GID (gid://shopify/Customer/7654321). BigCommerce, WooCommerce, and Magento take their numeric customer id.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations available, the description carries the behavioral disclosure burden and does so well: it reveals that only SKUs ordered >=2 times are considered, that confidence derives from cadence regularity, and that results are bucketed into four categories. It also discloses backend availability. However, it does not explicitly state that the call is read-only or describe behavior for unknown customers or customers with no eligible SKU history.

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

Conciseness5/5

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

Though longer than a typical description, every sentence serves a distinct purpose: audience, core action, output behavior, bucket labels, example queries, backend support, and a platform exclusion. It is front-loaded with the essential action and contains no filler or repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the absence of an output schema, the description sufficiently explains the return value shape (predicted next-order dates, confidence, buckets) and provides usage triggers. It also covers optional filtering and backend constraints. Minor gaps remain: no explicit read-only declaration, no error-handling notes for missing customers, and no handling of customers with fewer than two ordered SKUs.

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

Parameters3/5

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

The input schema already provides 100% parameter description coverage, including customer_id format variants (numeric vs. GID) and product_id's optional filtering purpose. The tool description reinforces the product_id usage with a query example but does not add new parameter-level semantics beyond what the schema already gives.

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 opens with a specific verb and resource: 'predict when a B2B customer / account is due to reorder.' It goes further to specify output granularity (per-SKU next-order dates), confidence based on cadence regularity, and concrete bucket labels ('overdue' / 'due_soon' / 'on_track' / 'not_predictable'), which clearly distinguishes it from sibling forecasting and recommendation tools like forecast_bundle or score_cross_sell.

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?

The description supplies explicit trigger queries ('what's Acme Corp due to reorder?', 'when will customer X need more of Y?') and a broader use case ('show me stockout risks for my B2B accounts'), plus proactive replenishment. It also states supported backends and an explicit exclusion ('Not available on OroCommerce'), giving an agent clear when-to-use and when-not-to-use guidance.

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