Query daily metrics
query_dailyDaily records or week/month aggregates. aggregation identifies sum or unweighted average of stored daily values; daily_min/max are extrema of daily values, not raw samples. days_present counts stored dates; days_expected counts calendar dates in period_start/end clipped to the request, not expected sensor wear. Units and aggregation methods are kept separate. Entirely missing buckets/metrics have no row: missing is not zero. Weekly labels use SQLite %Y-W%W (Monday weeks split at New Year), not ISO weeks; use period_start/end. Limit 500 rows. If truncated, discard the partial response and re-query smaller non-overlapping ranges aligned to complete buckets, or fewer metrics. Do not combine partial bucket averages without weighting by days_present.
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": {
"metrics": "<metrics>",
"from": "<from>",
"to": "<to>"
},
"name": "query_daily"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | ||
| from | Yes | ||
| metrics | Yes | ||
| granularity | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | ||
| setup | No | ||
| truncated | Yes | ||
| plan_limit | No |