Skip to main content
Glama
ranson21

kube-diagnostics-mcp

by ranson21

query_metrics

Run raw PromQL range queries against Prometheus to obtain compacted metric summaries for diagnosing Kubernetes issues.

Instructions

Escape hatch: raw PromQL range query against the configured Prometheus, compacted (first/last/min/max/avg + 12 samples per series).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stepNo
queryYes
windowNoTime window like 15m, 2h, 1d (default 1h)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations provided, the description must disclose behavioral traits itself. It reveals a key behavior: results are compacted to first/last/min/max/avg plus 12 samples per series, which is not obvious from the schema. However, it does not mention whether the operation is read-only (likely, but not stated), potential performance implications, or failure modes for malformed queries. It provides some transparency but leaves important aspects unaddressed.

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?

The description is a single, concise sentence that front-loads the core purpose ('Escape hatch: raw PromQL range query') and then provides the compaction detail. It is efficient and avoids redundancy. It loses a point because the opening 'Escape hatch' is colloquial and could be more explicit about the tool's role, but overall it is well-structured and succinct.

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 tool with no output schema and only three parameters, the description covers the purpose and a key behavior (compaction) but leaves gaps: it does not explain the return format beyond the compaction detail, does not clarify the meaning of 'step', and provides no usage examples. As an escape hatch, an agent would benefit from more guidance on constructing queries, but the description is not entirely inadequate for a power user.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 33% (only 'window' has a description). The description does not compensate for the missing semantics of 'query' and 'step'. It does not explain that 'query' expects a PromQL expression, nor what 'step' represents (e.g., seconds). Given the low coverage, the description was expected to add meaning to these parameters but adds none beyond the schema.

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 tool performs a raw PromQL range query against a configured Prometheus, distinguishing it from all specialized sibling tools. It names the specific verb (query), the resource (Prometheus), and the exact nature (raw PromQL range query with compaction). This unambiguously identifies its purpose and sets it apart from siblings like get_golden_signals or get_web_vitals.

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 phrase 'Escape hatch' implies this tool is meant for cases not covered by other metric tools, but it does not explicitly state when to use it or when to prefer a sibling. It offers no direct comparison or condition like 'use this when you need arbitrary PromQL not exposed by other endpoints.' Usage is only implied through the escape-hatch label, which is weak guidance.

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