Loki: Request
loki_requestCall any raw Loki read endpoint the named tools don't cover, such as format_query, volume_range, alerts, or config. Ideal for fetching unshaped GET responses when no dedicated tool exists.
Instructions
Escape hatch: GET any Loki read endpoint the other tools do not wrap — /loki/api/v1/index/volume_range, /loki/api/v1/format_query (pretty-prints and validates LogQL without running it), /prometheus/api/v1/alerts, or /config (this Loki's whole running configuration, as YAML). The answer is the raw data (or text), unshaped, cut at max_chars. Read-only: only GET is ever sent. Prefer the named tools, which shape their output.
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": {
"path": "<path>"
},
"name": "loki_request"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | API path, e.g. "/loki/api/v1/format_query". | |
| params | No | Query parameters, e.g. {"query": "{app=\"api\"}"}. Times are best sent as unix nanoseconds or RFC3339. A repeated parameter is an array. | |
| max_chars | No | Cut the answer at this many characters (100-200000). Defaults to 20000. |