Best and worst sellers
top_productsRanks products by revenue or units sold in a period. 'bottom' lists the slowest sellers among products that sold at least once.
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": "top_products"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| by | No | revenue | |
| limit | No | How many rows to return (max 100). | |
| order | No | top | |
| store | No | Store address or id. Leave empty if you have only one store. | |
| period | No | today, yesterday, this_week, last_week, this_month, last_month, last_7_days, last_30_days, last_90_days, this_year, last_year — or YYYY-MM-DD..YYYY-MM-DD. Uses the store's own timezone. | last_30_days |