get_sales_trend
Retrieve sales trend data for any date range with selectable daily, weekly, or monthly granularity and channel filters. Plot sales performance over time to spot trends.
Instructions
取得銷售趨勢數據,支援每日/每週/每月粒度,可用於繪製趨勢圖。
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": "get_sales_trend"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| channel | No | 通路篩選 | all |
| end_date | Yes | 結束日期 YYYY-MM-DD。建議與 start_date 維持較短區間以加快查詢。 | |
| start_date | Yes | 起始日期 YYYY-MM-DD。⚠️ 本工具會逐頁掃描區間內所有訂單,區間越大越慢,請只查實際需要的最小區間(如單週或單月),避免一次查詢過長期間。 | |
| granularity | No | 時間粒度 | daily |