query_range
Run PromQL range queries against a Prometheus-compatible datasource, auto-adjusting step and flagging truncated results when max points are exceeded.
Instructions
Run a PromQL range query against a Prometheus-compatible datasource. The 'step' is auto-adjusted upward when the result would exceed max_points (default 1000) per series, and 'truncated' is set in the response.
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": {
"ds_id": "<ds_id>",
"query": "<query>",
"start": "<start>",
"end": "<end>"
},
"name": "query_range"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | Yes | End time (Unix seconds) | |
| step | No | Resolution step in seconds (auto if omitted) | |
| ds_id | Yes | Datasource ID | |
| query | Yes | PromQL expression | |
| start | Yes | Start time (Unix seconds) | |
| max_points | No | Cap points per series (default 1000) |