Skip to main content
Glama
mshegolev

mshegolev/prometheus-mcp

prometheus_list_label_values

Read-onlyIdempotent

List all values for a Prometheus label, with optional series selector filter, to discover entities like job names or instances for building targeted PromQL queries.

Instructions

List all values for a specific label from Prometheus.

Wraps GET /api/v1/label/{label_name}/values. Returns all distinct values for the named label across all time series, optionally filtered by a series selector.

Use this to discover what entities exist for a given label dimension — for example, which jobs are running, which instances are scraped, or which namespaces have metrics. This is essential for building targeted PromQL queries during investigation.

Examples: - Use when: "What jobs does Prometheus scrape?" → label='job'; read the values list. - Use when: "What instances are in the 'node-exporter' job?" → label='instance', match='{job="node-exporter"}'. - Use when: "What namespaces have metrics?" → label='namespace'. - Don't use when: You want metric names (call prometheus_list_metrics — has substring filtering). - Don't use when: You want current metric values (call prometheus_query with a PromQL expression).

Returns: dict with label / match / total_count / returned_count / truncated / values (sorted list).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelYesLabel name to retrieve values for. Examples: 'job' (list all job names), 'instance' (list all instances), '__name__' (list all metric names — same as prometheus_list_metrics).
matchNoOptional series selector to restrict which series the label values come from. Example: 'up' returns label values only from the 'up' metric. Example: '{job="node"}' returns label values only from the node job. Leave empty to get values across all series.
instanceNoTarget instance name (omit for default instance)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelYes
matchYes
valuesYes
truncatedYes
total_countYes
returned_countYes
Behavior4/5

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

Annotations already declare readOnlyHint and idempotentHint, so the description adds context about the API endpoint, optional filtering, and the return structure (label, match, total_count, etc.), which goes beyond annotations.

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

Conciseness4/5

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

The description is well-structured with examples and bullet points, though slightly verbose. It earns its place by being informative and actionable.

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

Completeness5/5

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

With output schema present (return dict described), moderate complexity, and full annotation coverage, the description is complete: it covers purpose, parameter usage, return format, and differentiation from siblings.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3. The description adds real-world examples for label and match parameters, explaining how to use them for typical investigations, which provides value beyond the schema.

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 clearly states it lists all values for a specific label from Prometheus, wrapping the GET /api/v1/label/{label_name}/values endpoint. It distinguishes from sibling tools by explicitly naming alternatives (prometheus_list_metrics, prometheus_query) and explaining when not to use this tool.

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

Usage Guidelines5/5

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

Provides explicit when-to-use examples ('What jobs does Prometheus scrape?') and when-not-to-use cases with specific alternative tools, making it easy for the agent to decide.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mshegolev/prometheus-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server