Bucket calculation
ladder_calcBucket a time-series range into fixed intervals and compute sums, averages, or meter deltas, returning anomaly codes for missing, repeated, or reset readings.
Instructions
Bucket [start, end) and compute one value per bucket.
``dimension`` is the bucket size (minute/hour/day/month, both edges
must align to it) and ``rule`` is one of:
* ``sum`` — bucket sum;
* ``avg`` — bucket mean of sums/counts, row totals are means of means;
* ``meter_delta`` — next bucket's first reading minus this bucket's;
the last bucket reads one bucket past ``end``; missing anchors,
repeated readings and meter resets come back as ``anomaly`` codes
(``no_current_reading``, ``no_next_reading``, ``same_reading``,
``negative_delta``, ``non_numeric``) instead of values.
``mode`` is ``tb`` (source only), ``mixed`` (local first) or
``local`` (offline).
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": {
"series": "<series>",
"start": "<start>",
"end": "<end>"
},
"name": "ladder_calc"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | Yes | ||
| mode | No | tb | |
| rule | No | sum | |
| start | Yes | ||
| series | Yes | ||
| dimension | No | day | |
| materialize | No | ||
| verify_on_read | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||