Analyze a metric
analyze_metricCompute descriptive statistics and a linear trend for a health metric over a specified time period. Get count, min/max, mean, median, standard deviation, and projected next value.
Instructions
Compute analysis-ready statistics and a trend for one metric over a window.
Returns count, first/last/latest, min/max, mean, median, standard deviation, and a least-squares linear trend (slope per day, projected next value, direction). These are descriptive statistics for interpretation — not a diagnosis.
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": {
"metric": "<metric>"
},
"name": "analyze_metric"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user | No | which person; defaults to the primary user. | |
| since | No | ||
| until | No | ||
| metric | Yes | the metric name to analyse (e.g. 'weight_kg'). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||