Cross-Dataset Analysis
ps_cross_analysisAnalyze stock and order data server-side to find dead products, low movers, or out-of-stock items with demand, returning compact results without manual pagination.
Instructions
Perform server-side cross-dataset analysis combining stock and order data. Returns only the final compact result — no intermediate raw records are exposed. Use this instead of manually paginating ps_list_stock + ps_list_orders to avoid filling the context window.
analysis_type options:
• "dead_products" — products with stock > threshold but 0 units sold in the last days days
• "low_movers" — products with stock > threshold and fewer than threshold units sold (sorted by velocity asc)
• "out_of_stock_with_demand" — products with quantity = 0 that had at least 1 sale in the last days days
Supports pagination via limit + offset for large catalogues.
Args:
analysis_type: One of "dead_products", "low_movers", "out_of_stock_with_demand" (required)
days: Lookback period in days for sales data (default: 90)
threshold: Stock quantity threshold; interpretation depends on analysis_type (default: 0)
lang_id: Language ID for product names (default: "1")
limit: Max products to scan from PrestaShop (default: 200, max: 500)
offset: Skip N products — use with limit to paginate large catalogues (default: 0)
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"analysis_type": "<analysis_type>"
},
"name": "ps_cross_analysis"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | Lookback period in days | |
| limit | No | Max products to scan | |
| offset | No | Pagination offset for large catalogues | |
| lang_id | No | Language ID for product names | 1 |
| threshold | No | Stock quantity threshold (dead_products/low_movers: min stock to consider; out_of_stock_with_demand: ignored) | |
| analysis_type | Yes | Type of analysis to perform |