# list_loki_label_names

Lists all available label names (keys) found in logs within a specified Loki datasource and time range

Agent View of the PolicyLayer registry record for `list_loki_label_names`. HTML page: https://policylayer.com/tools/0xteamhq-mcp-grafana/list-loki-label-names

## Facts

- Tool: `list_loki_label_names`
- Server: Grafana MCP Server (`0xteamhq/mcp-grafana`) — https://policylayer.com/tools/0xteamhq-mcp-grafana.md
- Homepage: https://github.com/0xteamhq/mcp-grafana
- Risk category: Read (Low risk)
- Registry record: grade C, identity unverified
- Server rate-limited: no
- Parameters: 0
- Recommended policy verdict: Allowed

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_loki_label_names",
    "arguments": {}
  }
}
```

## Why list_loki_label_names is rated Low

This tool retrieves metadata (label keys) from a Loki datasource without altering data or triggering side effects. It is a straightforward read operation analogous to schema introspection or list operations. The low severity reflects minimal blast radius—discovering available labels poses no direct risk even if misused.

From the tool's own definition: "Tool 'lists all available label names' in logs—a read-only query operation with no modification, deletion, or execution of external operations."

## Use case

AI agents call list_loki_label_names to retrieve information from Grafana MCP Server without modifying anything. It is typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.

## Recommended policy (PolicyLayer)

Verdict: **Allowed**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Grafana MCP Server:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "list_loki_label_names": {}
  }
}
```

## Other tools on Grafana MCP Server (42)

- `query_loki_logs` — Execute — https://policylayer.com/tools/0xteamhq-mcp-grafana/query-loki-logs.md
- `fetch_pyroscope_profile` — Read — https://policylayer.com/tools/0xteamhq-mcp-grafana/fetch-pyroscope-profile.md
- `find_error_pattern_logs` — Read — https://policylayer.com/tools/0xteamhq-mcp-grafana/find-error-pattern-logs.md
- `find_slow_requests` — Read — https://policylayer.com/tools/0xteamhq-mcp-grafana/find-slow-requests.md
- `generate_deeplink` — Read — https://policylayer.com/tools/0xteamhq-mcp-grafana/generate-deeplink.md
- `get_alert_rule_by_uid` — Read — https://policylayer.com/tools/0xteamhq-mcp-grafana/get-alert-rule-by-uid.md
- `get_assertions` — Read — https://policylayer.com/tools/0xteamhq-mcp-grafana/get-assertions.md
- `get_current_oncall_users` — Read — https://policylayer.com/tools/0xteamhq-mcp-grafana/get-current-oncall-users.md
- `get_dashboard_by_uid` — Read — https://policylayer.com/tools/0xteamhq-mcp-grafana/get-dashboard-by-uid.md
- `get_dashboard_panel_queries` — Read — https://policylayer.com/tools/0xteamhq-mcp-grafana/get-dashboard-panel-queries.md
- `get_dashboard_property` — Read — https://policylayer.com/tools/0xteamhq-mcp-grafana/get-dashboard-property.md
- `get_dashboard_summary` — Read — https://policylayer.com/tools/0xteamhq-mcp-grafana/get-dashboard-summary.md
- `get_datasource_by_name` — Read — https://policylayer.com/tools/0xteamhq-mcp-grafana/get-datasource-by-name.md
- `get_datasource_by_uid` — Read — https://policylayer.com/tools/0xteamhq-mcp-grafana/get-datasource-by-uid.md
- `get_incident` — Read — https://policylayer.com/tools/0xteamhq-mcp-grafana/get-incident.md
- `get_oncall_shift` — Read — https://policylayer.com/tools/0xteamhq-mcp-grafana/get-oncall-shift.md
- `get_sift_analysis` — Read — https://policylayer.com/tools/0xteamhq-mcp-grafana/get-sift-analysis.md
- `get_sift_investigation` — Read — https://policylayer.com/tools/0xteamhq-mcp-grafana/get-sift-investigation.md
- `list_alert_rules` — Read — https://policylayer.com/tools/0xteamhq-mcp-grafana/list-alert-rules.md
- `list_contact_points` — Read — https://policylayer.com/tools/0xteamhq-mcp-grafana/list-contact-points.md
- `list_datasources` — Read — https://policylayer.com/tools/0xteamhq-mcp-grafana/list-datasources.md
- `list_incidents` — Read — https://policylayer.com/tools/0xteamhq-mcp-grafana/list-incidents.md
- `list_loki_label_values` — Read — https://policylayer.com/tools/0xteamhq-mcp-grafana/list-loki-label-values.md
- `list_oncall_schedules` — Read — https://policylayer.com/tools/0xteamhq-mcp-grafana/list-oncall-schedules.md
- `list_oncall_teams` — Read — https://policylayer.com/tools/0xteamhq-mcp-grafana/list-oncall-teams.md
- `list_oncall_users` — Read — https://policylayer.com/tools/0xteamhq-mcp-grafana/list-oncall-users.md
- `list_prometheus_label_names` — Read — https://policylayer.com/tools/0xteamhq-mcp-grafana/list-prometheus-label-names.md
- `list_prometheus_label_values` — Read — https://policylayer.com/tools/0xteamhq-mcp-grafana/list-prometheus-label-values.md
- `list_prometheus_metric_metadata` — Read — https://policylayer.com/tools/0xteamhq-mcp-grafana/list-prometheus-metric-metadata.md
- `list_prometheus_metric_names` — Read — https://policylayer.com/tools/0xteamhq-mcp-grafana/list-prometheus-metric-names.md
- …and 12 more: https://policylayer.com/tools/0xteamhq-mcp-grafana.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=0xteamhq-mcp-grafana · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/0xteamhq-mcp-grafana
