Time buckets for charts
time_bucketsSplit a time range into DST-aware minute, hour, day, week, month, quarter, or year buckets with exact start/end times for chart axes, time-series grouping, and filling empty dashboard periods.
Instructions
Split a time range into minute, hour, day, week, month, quarter or year buckets with exact start and end times in a time zone. DST-aware (23- and 25-hour days, repeated and skipped hours), ISO or Sunday/Saturday weeks, fiscal quarters, partial first and last buckets flagged or clipped. Up to 1,000 buckets. Use for chart axes, time-series grouping and filling empty periods in dashboards. First 25 calls per day are free, then $0.001 per call (x402).
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": {
"from": "<from>",
"to": "<to>"
},
"name": "time_buckets"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Range end, exclusive (same formats) | |
| clip | No | Clip the first and last buckets to [from, to) instead of returning whole buckets flagged partial | |
| from | Yes | Range start: YYYY-MM-DD (local midnight), local YYYY-MM-DDTHH:MM, or ISO 8601 with offset | |
| size | No | minute: 1,2,3,4,5,6,10,12,15,20,30; hour: 1,2,3,4,6,8,12. Other buckets: 1 | |
| bucket | No | day | |
| timezone | No | IANA time zone, e.g. America/New_York (default UTC) | |
| week_start | No | First day of the week. monday = ISO weeks (labels like 2026-W46) | monday |
| fiscal_year_start | No | Month the fiscal year starts (1 = January). Quarters, halves and years follow it; fiscal years are named by the calendar year they end in (start 7: FY2027 = July 2026 – June 2027) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | ||
| from | Yes | ||
| size | Yes | ||
| count | Yes | ||
| bucket | Yes | ||
| buckets | Yes | ||
| timezone | Yes | ||
| week_start | No | ||
| fiscal_year_start | No |