Skip to main content
Glama
mshegolev

mshegolev/prometheus-mcp

prometheus_list_alerts

Read-onlyIdempotent

Retrieve current Prometheus alerts, including firing and pending ones, with their labels, severity, state, active time, and value. Results grouped by state and severity count.

Instructions

List all active and pending alerts from Prometheus.

Wraps GET /api/v1/alerts. Returns every alert that Prometheus currently tracks, with labels (including alertname, severity), state (firing / pending), the time it became active, and its current value. Also returns a summary grouped by state and a count by severity label.

Examples: - Use when: "Are there any firing alerts right now?" → check firing_count and alerts where state='firing'. - Use when: "Show me all critical alerts" → filter alerts by labels.severity == 'critical'. - Use when: Checking system health during an incident — list alerts first to understand what's firing before querying metrics. - Don't use when: You want historical alert data (Prometheus stores only current state; use Alertmanager or a recording rule for history). - Don't use when: You want raw metric values (call prometheus_query or prometheus_query_range).

Returns: dict with total_count / firing_count / pending_count / state_summary / alerts (list with labels, annotations, state, active_at, value). Enhanced with correlation information when requested.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
instanceNoTarget instance name (omit for default instance)
correlation_contextNoOptional correlation context ID from federation_analyze_alerts for enhanced alert analysis.
include_correlation_infoNoInclude correlation-relevant information in output.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
alertsYes
total_countYes
firing_countYes
pending_countYes
state_summaryYes
Behavior5/5

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

Annotations already declare readOnlyHint and idempotentHint. The description adds behavioral details: wraps GET /api/v1/alerts, returns current state only, and includes correlation info when requested. No contradiction.

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?

Well-structured with summary, API detail, response fields, and examples. Front-loaded with purpose. Slightly lengthy but every sentence adds value.

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?

Given the output schema is described in detail, the tool is simple, and annotations cover safety, the description is complete. Includes alternatives and usage scenarios.

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% with clear parameter descriptions. The description adds minimal new info about parameters, mainly showing usage patterns in examples. Baseline 3 is appropriate.

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 active and pending alerts from Prometheus, specifying the API endpoint and response structure. It distinguishes from sibling tools like alertmanager_list_alerts by noting that Prometheus only stores current state.

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 'Use when' and 'Don't use when' examples, including when to use (checking firing alerts, critical alerts, during incidents) and when not (historical data, raw metrics), with alternatives like Alertmanager and prometheus_query.

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