Skip to main content
Glama
mcp-prometheus

mcp-prometheus

by mgcrea

Prometheus: List Labels

prometheus_list_labels
Read-only

List Prometheus label names across all series or filter by selector and time range; use substring search to discover labels before building queries.

Instructions

List label names, across everything or only on series matching a selector. To see one metric's labels with their values, prometheus_describe_metric is more useful.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

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

Input Schema

NameRequiredDescriptionDefault
endNoOnly consider series with samples before this: now, now-1h, -30m, an RFC3339 timestamp (2026-01-31T12:00:00Z) or unix seconds. Defaults to now.
matchNoA series selector to restrict to, e.g. `{namespace="monitoring"}` or `up{job=~"kube.*"}`. A selector only — no functions or operators. An empty matcher set `{}` is rejected by Prometheus; use at least one non-empty matcher such as `{job=~".+"}`.
startNoOnly consider series with samples after this: now, now-1h, -30m, an RFC3339 timestamp (2026-01-31T12:00:00Z) or unix seconds. Defaults to an hour before end (now-1h when end is not given), i.e. series that exist now. Pass now-30d to include ones that have since gone away.
searchNoCase-insensitive substring to filter by, e.g. `http`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.2.0
    • changedInput schema / properties / start / description
      Previous value: -"Only consider series with samples after this: now, now-1h, -30m, an RFC3339 timestamp (2026-01-31T12:00:00Z) or unix seconds. Defaults to now-1h, i.e. series that exist now. Pass now-30d to include ones that have since gone away."New value: +"Only consider series with samples after this: now, now-1h, -30m, an RFC3339 timestamp (2026-01-31T12:00:00Z) or unix seconds. Defaults to an hour before end (now-1h when end is not given), i.e. series that exist now. Pass now-30d to include ones that have since gone away."
  2. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

readOnlyHint=true already tells the agent this is a safe read, so the bar is lower. The description adds that the result is label names (not values) and that a selector can narrow the scope, which is useful behavioral context. It says nothing about result volume, pagination, or permission requirements, which matters when listing across a large Prometheus instance.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, zero filler, with the core action front-loaded and the disambiguation trailing. Every clause earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, but "List label names" makes the return value clear enough, and safety is covered by annotations while all parameters are documented in the schema. The main gap is the unresolved overlap with prometheus_list_label_values, which an agent cannot resolve from this definition.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all four parameters (match, search, start, end) are already fully documented with examples and defaults. The description only obliquely gestures at `match` via "series matching a selector" and adds nothing about the time-window or substring parameters. Baseline 3 is appropriate when the schema carries the load.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description pairs a specific verb and resource ("List label names") with an explicit scope choice: all labels versus labels on series matching a selector. It also contrasts itself with prometheus_describe_metric, so an agent can separate those two. It stops short of distinguishing itself from the closest sibling, prometheus_list_label_values, which is the other label-listing tool in the set.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives clear when-to-use context — the unscoped listing versus the selector-scoped listing — and explicitly routes to prometheus_describe_metric when the goal is one metric's labels with values. No exclusion is given against prometheus_list_label_values, so an agent choosing between the two label tools gets no help.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.