Skip to main content
Glama

grafana_query_metrics

Query Prometheus metrics through Grafana using PromQL expressions to monitor system performance and analyze time-series data.

Instructions

Execute a PromQL expression via a Grafana Prometheus datasource and return the results. Use grafana_list_datasources first to find the datasource UID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
datasource_uidYesThe UID of the Prometheus datasource in Grafana.
exprYesThe PromQL expression to evaluate.
fromNoStart of the time range, e.g. 'now-1h', 'now-30m'. Defaults to 'now-1h'.
toNoEnd of the time range, e.g. 'now'. Defaults to 'now'.
instantNoIf true, returns a single instant value. If false, returns a time series. Defaults to true.
Behavior3/5

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

No annotations are provided, so the description carries full burden. It mentions the need to obtain a datasource UID first (a prerequisite), but doesn't disclose other behavioral aspects like authentication requirements, rate limits, error handling, or what format the results will be returned in. The description adds some context but leaves significant gaps.

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 perfectly concise with just two sentences. The first sentence states the core functionality, and the second provides essential usage guidance. Every word earns its place with zero redundancy.

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

Completeness3/5

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

Given no annotations and no output schema, the description should provide more behavioral context for a query execution tool. While it covers purpose and usage guidelines well, it doesn't describe what format results will be returned in, error conditions, or authentication requirements. For a tool with 5 parameters and no structured output documentation, this is incomplete.

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%, so the schema already fully documents all 5 parameters. The description doesn't add any parameter-specific information beyond what's in the schema. According to guidelines, when schema coverage is high (>80%), the baseline score is 3 even with no param info in description.

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 the specific action ('Execute a PromQL expression'), target resource ('via a Grafana Prometheus datasource'), and outcome ('return the results'). It distinguishes itself from sibling tools like grafana_list_datasources by focusing on query execution rather than listing resources.

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?

The description explicitly provides when-to-use guidance by stating 'Use grafana_list_datasources first to find the datasource UID.' This clearly directs users to a prerequisite tool and establishes a workflow, distinguishing it from alternatives like prometheus_query which might work directly with Prometheus.

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/alimuratkuslu/byok-observability-mcp'

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