Skip to main content
Glama
AIops-tools

observability-aiops

range_query

Evaluate a PromQL expression over a time range to retrieve Prometheus metrics. Specify query, start, end, and optional step; handles truncated results.

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
Behavior4/5

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

It discloses the return envelope (returned/limit/truncated) and explicitly warns that truncated results are partial, advising the agent to narrow the selector or raise the limit. With no annotations provided, this adds essential behavioral context, though it omits error handling or authentication details.

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?

The description is compact and well-structured, starting with a clear purpose line, then a parameter list, and a note about the return envelope. Every sentence adds value with no redundant or filler content.

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?

It covers all input parameters, the return envelope, and truncation semantics, making the tool mostly self-contained. However, it mentions 'raise the limit' without explaining how, and does not address error behavior, leaving a minor gap for an agent handling unexpected outcomes.

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?

The description explains every parameter, including time formats for start/end, examples for step, and the meaning of the optional target. This goes far beyond the schema's bare type/title definitions and fully compensates for the 0% schema description coverage.

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 opens with '[READ] Evaluate a PromQL expression over a time range,' clearly stating the action (evaluate), resource (PromQL expression), and scope (time range). This distinctively separates it from sibling tools like instant_query and loki_query.

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 description implies usage for time-range queries but does not explicitly contrast with alternatives such as instant_query or specify when not to use it. No exclusions or alternative tool references are provided, so guidance is inferred rather than explicit.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/AIops-tools/Observability-AIops'

If you have feedback or need assistance with the MCP directory API, please join our Discord server