Detect trend
detect_trendMann-Kendall trend test — detect whether a time series is trending up, down, or stable.
Pass an array of ordered values (e.g., daily visitor counts from query_timeseries) to get a statistical determination of trend direction, strength (Kendall's tau), and significance (p-value). Also returns Sen's slope (change per time step). trend is "increasing", "decreasing", or "stable"; "stable" means no significant trend at the given alpha.
Requires at least 4 data points.
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": {
"values": "<values>"
},
"name": "detect_trend"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| alpha | No | Significance level (default 0.05) | |
| values | Yes | Ordered time-series values (e.g., daily visitors) |