# list_prometheus_metric_names

List metric names in a Prometheus datasource. Retrieves all metric names and filters them using regex.

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

## Facts

- Tool: `list_prometheus_metric_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_prometheus_metric_names",
    "arguments": {}
  }
}
```

## Why list_prometheus_metric_names is rated Low

This tool only queries and lists metric metadata from Prometheus without executing arbitrary queries, modifying data, or triggering external operations. It is a straightforward data retrieval operation with minimal blast radius if misused—an attacker could learn what metrics exist in the system but cannot access actual metric values, modify infrastructure, or execute code.

From the tool's own definition: "Tool description states it 'Retrieves all metric names' and 'filters them using regex'. The verb 'Retrieves' and the read-only nature of listing metric names (no datasource modification or query execution) clearly indicate a retrieval operation."

## Use case

AI agents call list_prometheus_metric_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_prometheus_metric_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_names` — Read — https://policylayer.com/tools/0xteamhq-mcp-grafana/list-loki-label-names.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
- …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
