query_metrics
Run PromQL queries instantly against Thanos to retrieve metrics. Supports optional timestamp for retrospective analysis.
Instructions
Run an instant PromQL query against Thanos.
Args:
query: PromQL expression, e.g. rate(http_requests_total[5m]).
time: Optional evaluation timestamp. Accepts RFC 3339 strings
(2024-01-01T00:00:00Z) or Unix timestamps as strings.
Defaults to now when omitted.
Returns:
JSON payload from Thanos containing resultType and result.
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": {
"query": "<query>"
},
"name": "query_metrics"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| time | No | ||
| query | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||