Skip to main content
Glama
mcp-server-devops
by Feliper83

Prometheus Instant Query

prometheus_query

Runs a PromQL instant query against Prometheus to return current metric values, with mock data when no backend is configured.

Instructions

Run a PromQL instant query against Prometheus. Connects to a real Prometheus instance when MCP_PROMETHEUS_URL is set (optionally MCP_PROMETHEUS_TOKEN for bearer auth); otherwise returns mock latency/error-rate/resource metrics so the tool is demoable without infra.

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>"
    },
    "name": "prometheus_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesPromQL expression, e.g. histogram_quantile(0.95, rate(http_request_duration_seconds_bucket[5m]))

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and it does substantial work: it discloses that a real Prometheus is only contacted when MCP_PROMETHEUS_URL is set, that bearer auth comes from MCP_PROMETHEUS_TOKEN, and that otherwise mock latency/error-rate/resource data is returned. That last point is critical because the agent could otherwise present fabricated metrics as real. It still says nothing about error behavior, timeouts, or the shape of a successful result.

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 sentences, front-loaded with the action and then the environment-dependent behavior. Every clause carries information the agent would otherwise have to guess at, and there is no filler or restatement of the tool name.

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 single-parameter tool with no output schema, the definition covers the essentials: what it does, where it connects, how auth is supplied, and whether results are real. A brief note on what a successful response looks like (instant vector vs. scalar) would close the remaining gap, since no output schema exists to document it.

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?

There is a single parameter with 100% schema description coverage, including a concrete PromQL example, so the schema already does the explanatory work. The description adds no parameter-level meaning beyond that baseline, which is acceptable for a one-param tool.

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 names a specific verb and resource ("Run a PromQL instant query against Prometheus") and the modifier "instant" distinguishes it from the range-query form. It does not explicitly contrast itself with the sibling tools, but the metric/query domain is clearly separate from dashboard summarization and pod status, so an agent can route on purpose alone.

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 implied rather than stated: an agent can infer this is the tool for querying Prometheus metrics, and the PromQL example in the schema reinforces that. However, there is no explicit when-to-use, when-not-to-use, or named alternative (e.g., when to reach for grafana_dashboard_summary instead), leaving the agent to infer.

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