Loki: List Label Values
loki_list_label_valuesList values of a Loki stream label, optionally filtered by a selector, to find exact label spelling for selectors instead of guessing with regex.
Instructions
List the values of one stream label, e.g. every namespace or every app, optionally only among streams matching a selector (the pods of one namespace). Use it to find the exact spelling to put in a selector rather than guessing with a regex.
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": {
"label": "<label>"
},
"name": "loki_list_label_values"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | Range end: now, now-1h, -30m, an RFC3339 timestamp (2026-01-31T12:00:00Z, nanosecond fractions kept) or unix seconds/nanoseconds. Defaults to now. | |
| label | Yes | The label name, e.g. `namespace`, `app`, `service_name`, `pod`. | |
| limit | No | Maximum values to return (1-5000). Defaults to 200. | |
| start | No | Range start: now, now-1h, -30m, an RFC3339 timestamp (2026-01-31T12:00:00Z, nanosecond fractions kept) or unix seconds/nanoseconds. Defaults to 6 hours before end. | |
| search | No | Case-insensitive substring to filter by, e.g. `api`. | |
| selector | No | A stream selector, e.g. `{namespace="payments", app="api"}`. Label matchers only: no line filters or parsers. At least one matcher must not match the empty string: `{app=~".+"}` works, `{app=~".*"}` and `{}` are rejected. |