Get a heartbeat's uptime
get_heartbeat_uptimeReport a heartbeat's uptime over the last N days or a date range, both total and per UTC day, to measure job reliability and identify downtime.
Instructions
Report one heartbeat's uptime over the last N days or a date range, in total and per UTC day, to answer how reliable a job has been. Uptime is the share of time since the heartbeat was created that no incident was open; paused time is left out; a heartbeat that never pinged and had no incident has a null uptime_percentage. Returns heartbeat_id, window_start (the window's first day at 00:00 UTC, or the creation if later; null when the window is older than the plan's history), window_end (the day after its last day at 00:00 UTC, or now), uptime_percentage, downtime_seconds, observed_seconds, incident_count and days (oldest first: date, uptime_percentage, downtime_seconds, observed_seconds; days before the creation are not listed). A range entirely older than the plan's history (get_plan_usage shows history_retention_days) returns window_start null, no days, null uptime_percentage and zero counters. For the outages themselves use list_incidents with heartbeat_id; for the heartbeat's state get_heartbeat; probed monitors use get_uptime_summary.
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": {
"heartbeat_id": "<heartbeat_id>"
},
"name": "get_heartbeat_uptime"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Last UTC date of a calendar range, YYYY-MM-DD, inclusive; needs from. Without it, or after today, the range ends today. | |
| days | No | How many days to cover, 1 to 1095, ending today; default 30, cut to the plan's history. Not together with from or to. | |
| from | No | First UTC date of a calendar range, YYYY-MM-DD, inclusive. The range is cut to the plan's history; a range entirely older than it returns no data. | |
| heartbeat_id | Yes | The heartbeat's uuid from list_heartbeats. An id that is not a heartbeat of this organization, or a deleted one, is a 404. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | Yes | ||
| window_end | Yes | End of the window: the day after its last day at 00:00 UTC, or now. | |
| heartbeat_id | Yes | ||
| window_start | Yes | Start of the window: its first day at 00:00 UTC, or the heartbeat's creation if that is later. Equal to window_end, with no days, when the window ended before the creation. Null when the window is older than the plan's history. | |
| incident_count | Yes | Incidents of the heartbeat that were open in the window. | |
| downtime_seconds | Yes | Seconds an incident of the heartbeat was open in the window while it was not paused. | |
| observed_seconds | Yes | Seconds of the window the heartbeat existed and was not paused; uptime is measured over this time. Never less than downtime_seconds. | |
| uptime_percentage | Yes |