Skip to main content
Glama
Prometheus MCP Server

Prometheus MCP Server

by Elad-Health

query_range

Run PromQL range queries to retrieve time series data across a specified start and end time, with configurable resolution steps.

Instructions

Execute a PromQL range query to get time series data over a time range

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>",
      "start": "<start>"
    },
    "name": "query_range"
  }
}

Input Schema

NameRequiredDescriptionDefault
endNoEnd time (RFC3339 or Unix timestamp). Default: now
stepNoQuery resolution step (e.g., "15s", "1m", "5m")1m
queryYesPromQL query expression
startYesStart time (RFC3339 or Unix timestamp, or relative like "1h" for 1 hour ago)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.2/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, and it discloses almost nothing beyond the verb: it does not confirm this is a read-only operation, does not mention the server-side limit on returned samples per range query, does not describe step auto-adjustment, and does not say what errors look like (bad PromQL, unreachable server).

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 or repetition. It is efficient, though the brevity borders on under-specification given the absence of annotations.

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?

For a four-parameter read query with a fully documented schema and no output schema, the definition is enough to call the tool correctly but not enough to predict its behavior. Missing are read-only confirmation, sample-limit behavior, and any note on returning series metadata, all of which matter for an agent planning a range query.

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 every parameter including the relative time syntax for start and the default for end/step is already documented in the schema. The description adds no parameter-level meaning at all, which lands exactly at the baseline for fully-documented schemas.

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 (execute), a specific query language (PromQL), and a specific scope (range query returning time series over a time range). The phrase 'over a time range' implicitly separates it from an instant query, though it never names the sibling that would be the alternative.

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?

Usage is only implied: the agent can infer this is for data spanning a window rather than a single point, which points away from query_instant. There is no explicit statement of when to prefer this tool, no prerequisites (e.g., that a reachable Prometheus target is required), and no exclusions.

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