Skip to main content
Glama
lukleh

mcp-read-only-grafana

by lukleh

get_alert_rules_with_state

Retrieve Grafana alert rules with their current state (normal, alerting, pending, etc.), optionally filtered by state or rule name, to verify alert status and health.

Instructions

Get all alert rules with their current evaluation state.

This endpoint returns rules organized by namespace with their current state (Normal, Pending, Alerting, NoData, Error). It's the same endpoint used by Grafana's Alert List panel - useful for checking if an alert is working after creation.

Args: connection_name: Name of the Grafana connection state: Optional filter by state (e.g., "firing", "pending", "inactive") rule_name: Optional filter by rule name (partial match)

Returns: JSON string with rules organized by namespace, each including state, health, and evaluation info.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stateNo
rule_nameNo
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.2/5.0
Behavior3/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It does mention the return format (JSON string with state, health, and evaluation info) and implies a read-only get, but it does not discuss side effects, permissions, error behavior, or filtering nuances.

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 concise and well structured, with a clear lead sentence followed by a brief explanatory note and per-parameter descriptions. There is no redundant or vague filler.

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

Completeness4/5

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

For a read-only tool returning a JSON string, the description covers purpose, filter parameters, and return contents. It does not include an example response or error cases, but given the tool's simplicity and the presence of related siblings, it is largely complete.

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?

All three parameters are individually described: connection_name identifies the Grafana connection, state filters by state, and rule_name filters by partial match. The description also lists possible state values (Normal, Pending, Alerting, NoData, Error), adding meaning beyond the bare schema, though it lacks examples and constraints.

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 that the tool retrieves all alert rules with their current evaluation state, organized by namespace. It also distinguishes itself from sibling tools by noting it is the same endpoint used by Grafana's Alert List panel and is useful for checking whether an alert is working after creation.

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?

The description provides a clear use case: checking if an alert is working after creation. It does not explicitly enumerate alternatives like get_firing_alerts or get_alert_rule_by_uid, but the focus on all rules with current state makes the intended scenario 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