Skip to main content
Glama
AIops-tools

observability-aiops

instant_query

Read-only

Evaluate PromQL expressions at one instant to inspect current metric values or alert states. Pass a query, optional timestamp, and target for governed, auditable results.

Instructions

[READ] Evaluate a PromQL expression at a single instant.

Args: query: A PromQL expression (e.g. 'up' or 'rate(http_requests_total[5m])'). time: Optional RFC-3339 or unix timestamp for the evaluation instant. target: Prometheus target name from config; omit for the default.

Returns an envelope with returned/limit/truncated. If truncated is true the result is partial — narrow the selector or raise the limit rather than treating it as complete.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
timeNo
queryYes
targetNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.0

TDQS

A3.8/5.0
Behavior4/5

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

readOnlyHint=true is already declared, so the annotation carries the safety profile, and the description usefully reinforces it with a '[READ]' tag. More importantly it discloses behavior beyond the annotations: that results arrive in an envelope and that truncated=true means a partial result requiring a narrower selector or higher limit. It doesn't cover pagination mechanics or any auth/target-resolution caveats.

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?

Front-loads the '[READ]' marker and the core purpose in one sentence, then uses a compact Args block with no filler. The Returns paragraph is slightly longer than needed, but the truncation warning is actionable rather than padding.

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?

With no output schema, the description steps in to describe the return envelope (returned/limit/truncated) and the meaning of partial results, which is exactly what an agent needs to avoid misreading output. It is nearly complete for this read tool; the only omissions are the default value of 'time' and any hint about result-size limits.

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

Parameters4/5

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

Schema coverage is 0%, so the description carries the full burden and largely meets it: it defines 'query' with concrete PromQL examples, gives accepted formats for 'time' (RFC-3339 or unix), and explains 'target' resolution plus the omit-for-default behavior. The one gap is that it never states what 'time' defaults to when omitted (presumably now).

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?

States a specific verb (evaluate) and resource (PromQL expression) scoped to a single instant. The 'single instant' qualifier implicitly separates it from the sibling range_query, but the description never names that alternative, so it falls short of the explicit sibling differentiation a 5 requires.

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 by 'at a single instant' and the documented 'time' argument, which together signal this is for point-in-time evaluation rather than a range. However, the description gives no explicit when-to-use, when-not, or reference to range_query as the alternative, so the agent must infer the selection rule.

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