Skip to main content
Glama

Get uptime statistics

get_uptime_statistics
Read-onlyIdempotent

Get uptime and downtime percentages for a monitor over a date range, grouped per minute, hour, day, week or month, alongside the average response timings measured in each interval. Use this to answer how much downtime a site had. A call returns at most 500 intervals, so pick a coarser group_by for a longer period. An interval without measurements, for example before the monitor was added, has null percentages: that is missing data, not downtime. The summary holds the uptime over the whole period. See https://ohdear.app/docs/api/uptime.

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": {
      "monitor_id": "<monitor_id>"
    },
    "name": "get_uptime_statistics"
  }
}

Input Schema

NameRequiredDescriptionDefault
endNoEnd of the period, as YmdHis (20241202120000) or ISO 8601. Defaults to now.
startNoStart of the period, as YmdHis (20241201120000) or ISO 8601. Defaults to seven days ago.
group_byNoGrouping interval: minute, hour, day, week, or month. Defaults to hour.
monitor_idYesThe ID of the monitor to get statistics for

Output Schema

NameRequiredDescriptionDefault
periodNoRequested time range and grouping interval when uptime is available.
messageNo
metricsYesCalculated uptime metrics for each interval. Intervals without measurements have null percentages.
monitorYes
summaryNoMeasurement count and uptime percentage over the whole period. Percentages are null when nothing was measured.
view_urlNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedOutput schema / properties / metrics / description
      Previous value: -"Calculated uptime metrics for each interval."New value: +"Calculated uptime metrics for each interval. Intervals without measurements have null percentages."
    • addedOutput schema / properties / summary
      Added value: +{
      +  "description": "Measurement count and uptime percentage over the whole period. Percentages are null when nothing was measured.",
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • changedInput schema / properties / group_by / description
      Previous value: -"Grouping interval: minute, hour, day, week, or month"New value: +"Grouping interval: minute, hour, day, week, or month. Defaults to hour."
  3. First observed

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare this a read-only, idempotent, non-destructive call, so the safety profile is covered. The description adds genuinely non-obvious behaviour beyond that: the 500-interval result cap, and the crucial semantic that null percentages in intervals without measurements mean missing data rather than downtime.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose and the user question come first, followed by the result-limit caveat, the null semantics, and the summary pointer. Every sentence contributes a distinct fact, and the fixed-length cap is placed where an agent will act on it while choosing group_by.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a four-parameter, read-only statistics tool with a full input schema and an output schema, the description covers the question it answers, the grouping trade-off, the result-size ceiling, and how to read null values, and it links the external docs. Nothing material is missing for correct invocation or interpretation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds meaning beyond the schema by tying group_by choice to the result cap and by explaining what an empty interval means for the returned percentages. The start/end formats themselves are left to the schema, which is fine given full coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource (uptime/downtime percentages for a monitor) plus the grouping dimensions and the accompanying response timings. It also scopes the result to a monitor and a date range, so an agent can tell this statistical aggregation apart from the sibling list_downtime_periods, which returns periods rather than percentages.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It states the intended question explicitly ('Use this to answer how much downtime a site had') and gives practical guidance to pick a coarser group_by for longer periods because of the 500-interval cap. It does not name an alternative tool or explain when to use list_downtime_periods instead, so it falls short of full when/when-not routing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources