detect_margin_erosion
Flag items whose gross profit percentage drops beyond a threshold over recent months, using trend analysis to highlight products at risk of unprofitability.
Instructions
Detect items whose gross profit percentage has declined by more than a threshold over recent months. Uses linear regression on per-item monthly GP% to identify a downward trend — flags items at risk of becoming unprofitable.
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": "detect_margin_erosion"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| months | No | Analysis window in months (default 12, max 24) | |
| erosionThresholdPct | No | Minimum GP% drop to flag as eroding (default 5) |