Skip to main content
Glama
lukleh

mcp-read-only-grafana

by lukleh

query_prometheus

Run PromQL queries against Prometheus in Grafana to retrieve time-series data for monitoring and analysis.

Instructions

Execute a PromQL query against a Prometheus datasource.

Args: connection_name: Name of the Grafana connection datasource_uid: UID of the Prometheus datasource query: PromQL query to execute time_from: Start time (e.g., 'now-1h' or timestamp) time_to: End time (e.g., 'now' or timestamp) step: Query resolution step (e.g., '15s')

Returns: JSON string with query results.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stepNo
queryYes
time_toNo
time_fromNo
datasource_uidYes
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/5.0
Behavior3/5

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

No annotations are provided, so the description carries the transparency burden. It states that the tool returns a JSON string with query results, but it does not explicitly mention whether the operation is read-only, what happens on errors, or whether any side effects occur.

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 compact and well-structured, with a single purpose statement and a clean parameter list. There is no redundant or filler content.

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 straightforward query tool with six parameters and no nested objects, the description and schema together provide enough information to invoke it correctly. Some detail about output structure and optional parameter defaults is absent, but not critical.

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?

The schema provides no per-parameter descriptions, but the tool description names and explains all six parameters with practical examples for time and step formats. It does not specify optional behavior when time_to/time_from or step are omitted, but the core semantics are clear.

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 ('Execute') and clearly identifies the resource ('Prometheus datasource') and query language ('PromQL'), making the tool's purpose immediately obvious and distinct from sibling query tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

The description implies when to use the tool—whenever a PromQL query needs to be executed against Prometheus—but it does not explicitly contrast it with sibling tools such as query_loki or explore_query, so some inference is required.

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