Skip to main content
Glama
mgcrea

mcp-prometheus

by mgcrea

Prometheus: List Labels

prometheus_list_labels
Read-only

List label names across all Prometheus series or only those matching a selector, search substring, and time range. Use it to discover labels before building PromQL 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.

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 now-1h, 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. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

The readOnlyHint annotation already establishes that this is a safe read operation. The description adds selector-scoping context, but it does not describe return ordering, pagination, or other behavioral details beyond what the schema and annotation provide.

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?

The description is two sentences, front-loaded with the core action and scope. The alternative tool guidance follows immediately with no wasted text.

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?

For a read-only list tool with no required parameters, full schema coverage, and no output schema, the description is largely complete. It could say more about what the returned label names look like, but the essential invocation context is present.

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 the schema already explains the selector, search, start, and end parameters in detail. The description mentions selector-based restriction but adds little beyond the structured parameter documentation.

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

Purpose5/5

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

The description states a specific verb and resource: list label names. It also clarifies the scope, either across everything or restricted to series matching a selector, and distinguishes the tool from prometheus_describe_metric.

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 usage context by explaining the two main modes: listing globally or using a selector. It also names prometheus_describe_metric as a more useful alternative for seeing one metric's labels with values, though it does not explicitly distinguish against every sibling such as prometheus_list_label_values.

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