Skip to main content
Glama
mshegolev

mshegolev/prometheus-mcp

prometheus_list_metrics

Read-onlyIdempotent

Discover available Prometheus metric names with an optional substring filter. Use this to find valid metrics before querying with PromQL.

Instructions

List all metric names known to Prometheus, with optional substring filter.

Wraps GET /api/v1/label/__name__/values. Prometheus returns all metric names at once — no pagination. Output is capped at 500 metrics after filtering, with a truncation hint when more exist.

Use this first to discover valid metric names before writing PromQL expressions for prometheus_query or prometheus_query_range.

Examples: - Use when: "What metrics does Prometheus have about HTTP requests?" → pattern='http'; read the metrics list. - Use when: "List all node_exporter metrics" → pattern='node_'. - Use when: Starting a monitoring investigation — list metrics first to discover what's instrumented, then query specific ones. - Don't use when: You already know the exact metric name and want to query its value (call prometheus_query directly — one fewer round trip). - Don't use when: You want to see current alert state (call prometheus_list_alerts).

Returns: dict with total_count / returned_count / truncated / pattern / metrics (sorted list).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patternNoOptional substring filter applied case-insensitively to metric names. Example: 'http' returns all metrics containing 'http' in their name. Leave empty to list all metrics (capped at 500).
instanceNoTarget instance name (omit for default instance)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
metricsYes
patternYes
truncatedYes
total_countYes
returned_countYes
Behavior5/5

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

Describes behavior beyond annotations: wraps a specific API, no pagination, cap of 500 metrics with truncation hint, case-insensitive filtering. Annotations already indicate read-only, idempotent, non-destructive.

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?

Well-structured, front-loaded with core purpose, followed by implementation detail, usage guidance, examples, and return format. Every sentence adds value; no redundancy.

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?

Tool is simple; description covers behavior, constraints, usage scenarios, and return format comprehensively. Output schema is described inline. No missing information.

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?

Input schema covers both parameters with detailed descriptions (100% coverage). The description adds context like capping and example usage, but parameter meaning is already clear from 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 metric names with optional substring filter, and distinguishes from sibling tools like prometheus_query and prometheus_list_alerts by specifying when to use each.

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?

Explicitly provides when-to-use (discovery before querying) and when-not-to-use (if metric name is known, use prometheus_query; for alerts, use prometheus_list_alerts), with concrete examples.

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