Skip to main content
Glama
ThainaJardim

observability-mcp

by ThainaJardim

query_loki_logs

Run a LogQL range query to retrieve logs from Grafana Loki, filtered by time range and direction.

Instructions

Run a Loki range query through Grafana datasource proxy.

Args: query: LogQL expression, e.g. {app="myservice"} |= "error". limit: Maximum number of log lines to return (1–5000, default 100). direction: "backward" (newest first, default) or "forward". start: Start of the time range. RFC 3339 or Unix nanosecond string. end: End of the time range. RFC 3339 or Unix nanosecond string.

Returns: JSON payload from Loki with streams and log entries.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endNo
limitNo
queryYes
startNo
directionNobackward

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations, the description carries full behavioral disclosure. It explains the tool goes through a proxy, returns a JSON payload with logs, and documents all parameters. It doesn't mention authentication requirements or rate limits, but overall it is transparent for a read-only query tool.

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 concise: a one-sentence summary followed by a bullet list of args and return value. No extraneous information, every line adds value. It is well-structured and easy to parse.

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?

Given five parameters and an output schema, the description covers all inputs and the return type. It omits potential limitations (e.g., max time range) and authentication context, but provides enough for an agent to use the tool effectively.

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?

Despite 0% schema description coverage, the description provides comprehensive parameter details: query syntax example, limit range (1-5000), direction options with defaults, and start/end format (RFC 3339 or Unix nanosecond). This fully compensates for the lack of schema descriptions.

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 range query on Loki logs via the Grafana datasource proxy, distinguishing it from siblings like query_loki_instant (for instant queries) and list_loki_labels (for metadata). The verb 'Run' and specific resource 'Loki range query' provide precise purpose.

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

Usage Guidelines4/5

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

The description implicitly differentiates from siblings by specifying 'range query' versus instant queries, and the parameter details for start/end make the usage context clear. However, it lacks explicit guidance on when to use this tool versus alternatives like query_loki_instant.

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/ThainaJardim/observability-mcp'

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