Skip to main content
Glama
lukleh

mcp-read-only-grafana

by lukleh

get_alert_state_history

Retrieve alert state transition history to debug alert behavior and understand evaluation patterns. Filter by rule UID, labels, or time range.

Instructions

Get alert state transition history.

Returns the history of state changes for alert rules, including transitions between Normal, Pending, Alerting, NoData, and Error states. Useful for debugging alert behavior and understanding evaluation patterns.

Args: connection_name: Name of the Grafana connection rule_uid: Optional filter by specific rule UID labels: Optional label matchers to filter history from_time: Start time (ISO 8601 or relative like "now-1h") to_time: End time (ISO 8601 or relative like "now") limit: Maximum number of history entries to return

Returns: JSON string with state history entries including timestamps and state transitions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
labelsNo
to_timeNo
rule_uidNo
from_timeNo
connection_nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.4.0

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations, the description carries the transparency burden. It discloses that the tool returns a JSON string with state history entries including timestamps and transitions, implying a read-only operation. It does not cover error cases or permission requirements, but the main behavior is clearly stated.

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 description is well structured with a short purpose statement, an Args list, and a Returns line. It is concise, contains no fluff, and is easy for an agent to parse quickly.

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?

The description covers all input parameters, the output format, and the intended use case. Even though an output schema exists, the description still usefully states that the result is a JSON string with timestamps and state transitions, making the tool's behavior clear end to end.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Although the schema itself has no descriptions, the tool description's Args section explains every parameter: connection_name, rule_uid, labels, from_time, to_time, and limit. It even gives time format examples like 'now-1h' and clarifies limit as a maximum number of entries.

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 uses a specific verb and resource: 'Get alert state transition history.' It clearly distinguishes this tool from siblings like get_alert_rules_with_state and get_firing_alerts by focusing on historical state changes rather than 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 Guidelines4/5

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

It gives clear context: 'Useful for debugging alert behavior and understanding evaluation patterns.' It does not explicitly mention when not to use this tool or recommend alternatives, but the history-focused language makes the primary use case clear.

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

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/lukleh/mcp-read-only-grafana'

If you have feedback or need assistance with the MCP directory API, please join our Discord server