Skip to main content
Glama

query_range

Destructive

Execute LogQL range queries to fetch logs over specified time windows from Loki, enabling log analysis and troubleshooting.

Instructions

Execute a LogQL range query against Loki to fetch logs over a time window

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
directionNoSort order: forward or backward. Defaults to backward
endNoEnd of time range (RFC3339 or Unix nanoseconds). Defaults to now
limitNoMaximum number of entries to return. Defaults to 100, max 5000
queryYesLogQL query expression
startNoStart of time range (RFC3339 or Unix nanoseconds). Defaults to 1 hour ago
Behavior1/5

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

Annotations indicate destructiveHint=true and readOnlyHint=false, implying data modification or deletion, but description frames the tool as simply 'fetching' logs (a read operation). This creates a dangerous mismatch between expected and actual behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence is structurally efficient and front-loaded, but inappropriate brevity given the tool's destructive annotations. The conciseness comes at the cost of omitting critical safety information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Lacks output schema and description fails to indicate return format, pagination behavior, or what gets destroyed. For a tool marked destructive with 5 parameters, the description is insufficiently complete.

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?

Schema has 100% description coverage, establishing baseline 3. Description mentions 'LogQL' (clarifying the query parameter format) and 'time window' (referencing start/end), adding contextual meaning without repeating schema details.

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?

Clearly states the action (execute LogQL range query), target system (Loki), and scope (fetch logs over time window). Mentions 'range' which distinguishes from sibling 'query', though could explicitly contrast with instant queries.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides no guidance on when to use this vs. the sibling 'query' tool or others. Fails to warn about the destructive nature implied by annotations, giving no prerequisites or conditions for safe usage.

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/incu6us/loki-mcp-server'

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