Skip to main content
Glama
Prometheus MCP Server

Prometheus MCP Server

by Elad-Health

get_alert_history

Query alert state changes over a time range using the ALERTS metric, optionally filtering by alert name, to review when alerts fired and resolved.

Instructions

Query alert state changes over time using ALERTS metric

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_alert_history"
  }
}

Input Schema

NameRequiredDescriptionDefault
alertnameNoFilter by alert name
timeRangeNoTime range to look back (e.g., "1h", "24h", "7d")1h

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full disclosure burden. Saying it queries the ALERTS metric hints that this is a read-only PromQL-style lookup, but it says nothing about permissions, result shape, row limits, or whether an empty result means no changes or no data.

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?

A single front-loaded sentence with no filler. It is efficient, though it is arguably too terse for the disclosure burden it carries given the absence of annotations.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple (2 optional params), but with no output schema and no description of what a 'state change' record contains (timestamps, active/pending/firing states, labels), an agent cannot anticipate the response. That gap should have been closed in the description.

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% and both parameters (alertname, timeRange) are documented with format examples in the schema itself. The description adds no extra semantics such as whether alertname is an exact match or regex, so the baseline of 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?

The description gives a specific verb+resource ('Query alert state changes') plus the underlying data source ('ALERTS metric'), so an agent knows this returns historical alert state transitions rather than current alert listings. It does not name a sibling such as list_alerts to sharpen the boundary, keeping it below 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 Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no explicit when-to-use guidance, no when-not-to-use, and no named alternative. The phrase 'over time' implicitly contrasts with a current-alerts tool, but the agent must infer that distinction rather than being told it.

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