Skip to main content
Glama
mcp-prometheus

mcp-prometheus

by mgcrea

Prometheus: List Label Values

prometheus_list_label_values
Read-only

Lists every value a Prometheus label takes, optionally restricted to series matching a selector. Use it to fetch exact label values before filtering metrics instead of guessing regexes.

Instructions

List the values one label takes — every namespace, job or instance — optionally only on series matching a selector (e.g. the pods of one deployment). Use it to get exact values right before filtering on them, instead of guessing at a regex.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "label": "<label>"
    },
    "name": "prometheus_list_label_values"
  }
}

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.
labelYesLabel name, e.g. `namespace`, `job`, or `__name__` for metric names.
limitNoMaximum values to return (1-5000). Defaults to 200.
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?

The readOnlyHint annotation already establishes this is a safe read with no side effects, so the description's burden is lower. It adds that the selector is optional and can narrow scope to 'the pods of one deployment', but says nothing about result ordering, whether the limit silently truncates, or what the response looks like. Useful context, but thin beyond the annotation.

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, no filler. The core action and its optional scoping come first, and the intended workflow follows immediately.

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 listing tool with fully described parameters and no output schema, the description covers purpose and workflow adequately. It omits return shape and truncation behavior at the limit, which are minor for a simple value enumeration.

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 six parameters including the start/end window semantics and limit bounds are already documented. The description adds only the motivating example of restricting by a deployment's pods, which does not exceed what the match parameter description already conveys. Baseline 3 applies.

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?

States a specific verb and resource: 'List the values one label takes', with concrete examples (namespace, job, instance). It implicitly separates itself from prometheus_list_labels by emphasizing values rather than label names, though it never names the sibling to make the distinction airtight.

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?

Gives clear when-to-use guidance: 'Use it to get exact values right before filtering on them, instead of guessing at a regex', which tells the agent this is a discovery step preceding filtered queries. It does not name an alternative tool or state when not to use it, so it stops short of full routing guidance.

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