Skip to main content
Glama
mgcrea

mcp-prometheus

by mgcrea

Prometheus: Get TSDB Status

prometheus_get_tsdb_status
Read-only

Analyze Prometheus TSDB head block cardinality to identify top metrics, labels, and label pairs by memory; diagnose slow or memory-hungry instances and avoid high-cardinality grouping.

Instructions

Cardinality: how many series the head block holds, and which metrics, labels and label pairs account for most of them and of the memory. Use it to explain a slow or memory-hungry Prometheus, or before grouping by a label that might have thousands of values. Covers the head block only (the last ~2-3 hours), not the full retention.

Input Schema

NameRequiredDescriptionDefault
limitNoEntries in each top-N list (1-100). Defaults to 10.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations only declare readOnlyHint, so the description carries most of the behavioral burden and does so well: it discloses the scope limitation that results cover the head block only (~2-3 hours) and not full retention — critical information that prevents misinterpreting the numbers. It doesn't mention cost or response volume for high-cardinality servers, which keeps it from a 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?

Three sentences, front-loaded with what the data is, then why to call it, then the scope caveat. Every sentence earns its place and nothing is repeated from the schema or annotations.

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?

No output schema exists, so the description must convey what comes back — and it does, describing ranked top-N breakdowns by metrics, labels, label pairs and memory. Combined with the explicit retention caveat, an agent has everything needed to call it and interpret results 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?

The single parameter has 100% schema description coverage, so the schema already explains limit, its 1-100 range and the default of 10. The description adds nothing about the parameter, so the baseline 3 for high-coverage schemas 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?

The description opens with a precise characterization of the resource: cardinality of the head block, broken down by metrics, labels and label pairs, ranked by series count and memory. That is specific enough to distinguish it from prometheus_list_metrics or prometheus_describe_metric, which inspect individual metrics rather than aggregate cardinality. It stops short of explicitly naming siblings, so not a 5.

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 two concrete triggering scenarios: diagnosing a slow or memory-hungry Prometheus, and sanity-checking a label before grouping by it. That is clear when-to-use guidance. It does not say when NOT to use it or name the alternative tool for those cases, so it falls 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.