Skip to main content
Glama
mcp-prometheus

mcp-prometheus

by mgcrea

Prometheus: Describe Metric

prometheus_describe_metric
Read-only

Inspect a Prometheus metric's type, help, unit, series count, labels, cardinality, and example values before writing a PromQL selector to choose filters and group-by fields.

Instructions

Everything needed to query one metric: type, help, unit, how many series it has, and each label with its number of distinct values and examples. Read this before writing a selector — it shows which labels exist to filter and group by, and whether a label is high-cardinality (pod, uid) and so a bad thing to group by.

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": {
      "metric": "<metric>"
    },
    "name": "prometheus_describe_metric"
  }
}

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.
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.
metricYesA metric name, e.g. `http_requests_total`. For a histogram or summary, the base name (`http_request_duration_seconds`) covers its _bucket, _count and _sum series.
examplesNoExample values to show per label (0-50). Defaults to 8.

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

A4.3/5.0
Behavior4/5

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

Annotations already establish that this is read-only, but the description adds useful behavioral context about the returned metadata, label value examples, and cardinality warnings. It does not discuss limits, permissions, or response structure beyond the content summary, which keeps it below 5.

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 definition is two tight sentences: the first front-loads what the tool returns, and the second explains the practical reason to call it before composing a selector. There is no redundant or filler wording.

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 no output schema, the description carries the burden of explaining return values, and it does so by listing the metric metadata and label cardinality details an agent will receive. Combined with the rich input schema and read-only annotation, it is complete enough to call correctly.

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 coverage is 100%, so the metric, start, end, and examples parameters are already fully documented in the schema. The description reinforces the metric-level view and label examples but adds little parameter-specific meaning beyond the structured fields.

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/resource combination and enumerates exactly what describing a metric yields: type, help, unit, series count, and per-label cardinality/examples. It is clearly distinct from sibling query/list tools.

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 explicit timing guidance: read this before writing a selector, especially to discover filter/group labels and avoid high-cardinality labels. It does not name alternative sibling tools or explain when not to use it, so it falls just short of a 5.

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