Skip to main content
Glama
AIops-tools

observability-aiops

range_query

Read-only

Evaluate a PromQL expression across a time range to inspect metric trends. If results are truncated, narrow the selector or raise the limit.

Instructions

[READ] Evaluate a PromQL expression over a time range.

Args: query: A PromQL expression. start: Range start (RFC-3339 or unix timestamp). end: Range end (RFC-3339 or unix timestamp). step: Resolution step (e.g. '60s', '5m'). 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
endYes
stepNo60s
queryYes
startYes
targetNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.0

TDQS

A4/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=true, and the description adds real value beyond that: the [READ] tag, the envelope shape (returned/limit/truncated), and the critical semantic that truncated=true means partial results. Minor flaw: it advises 'raise the limit' though no limit parameter exists in the schema, which could mislead.

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 one-line purpose, then uses compact Args/Returns sections; every line earns its place. The 'raise the limit' sentence introduces a small inconsistency that costs a bit of clarity.

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 appropriately explains the return envelope and truncation semantics, and it fully covers the untitled parameters. The only gap is the dangling reference to a limit that cannot be set through the documented parameters.

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

Parameters5/5

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

Schema description coverage is 0%, so the description carries the full burden and does so: it documents all five parameters including formats (RFC-3339 or unix timestamp), a step example ('60s', '5m'), and target's default-omission behavior.

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 over a time range), which an agent can readily separate from the range-less sibling instant_query. It does not explicitly name that sibling, so the differentiation is implicit rather than stated.

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?

No explicit when-to-use/when-not guidance or named alternatives; the range-vs-instant distinction against instant_query must be inferred from the tool name and 'over a time range'. It does give useful post-call guidance on what to do when results are truncated.

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