top_products
Identify best-selling products between two dates, ranked by revenue or units sold. Excludes cancelled orders and returns an empty list if no sales occur.
Instructions
Best-selling products between two dates, ranked by revenue or by units sold. Cancelled orders are excluded; a range with no sales returns an empty list.
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": {
"start_date": "<start_date>",
"end_date": "<end_date>"
},
"name": "top_products"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| by | No | Rank by 'revenue' or units sold ('quantity'). | revenue |
| limit | No | Maximum rows to return (1-50). Default 10. | |
| end_date | Yes | Last day included, YYYY-MM-DD (UTC). | |
| start_date | Yes | First day included, YYYY-MM-DD (UTC). Must be on or before end_date; the range may span at most 731 days. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end_date | Yes | ||
| products | Yes | ||
| ranked_by | Yes | ||
| start_date | Yes |