Skip to main content
Glama
mcp-prometheus

mcp-prometheus

by AmeesAnsari

query

Read-onlyIdempotent

Evaluate PromQL expressions at a single point in time to retrieve current metric values, with series sorted largest first.

Instructions

Evaluate PromQL at a single point in time (an instant query). Series are sorted by value, largest first.

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": {
      "promql": "<promql>"
    },
    "name": "query"
  }
}

Input Schema

NameRequiredDescriptionDefault
timeNoEvaluation time as RFC3339 or Unix seconds. Empty for now.
promqlYesPromQL expression, e.g. 'sum by (job) (rate(http_requests_total[5m]))'.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare read-only, idempotent, open-world, and non-destructive behavior, so the description need not repeat the safety profile. It adds useful return-order behavior ('Series are sorted by value, largest first') but does not cover auth, rate limits, error handling, or other operational traits.

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?

Two short sentences are front-loaded with the core operation and followed by a relevant return-ordering note. There is no redundant or filler text.

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?

The tool is simple, annotations fully cover safety, the input schema has complete description coverage, and an output schema exists, so the description does not need to explain return fields. It covers what the tool does and how results are ordered; only explicit sibling routing is absent.

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?

The schema fully describes both parameters (promql and time), so the baseline is 3 even without extra parameter detail in the description. The description says PromQL is evaluated at a single point in time, but adds no syntax, default-time, or formatting details beyond what the schema provides.

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 states a specific action (Evaluate PromQL) and scope (single point in time / instant query), which clearly distinguishes it by implication from a range-query sibling. It does not explicitly name query_range, so it stops short of full sibling differentiation.

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 usage context by specifying an instant query at one point in time, indicating when this tool is appropriate rather than a range query. It does not explicitly state when not to use it or name query_range as the alternative.

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