Skip to main content
Glama
AIops-tools

observability-aiops

loki_tail_errors

Tail recent error-level logs from a Loki stream selector over a configurable lookback window. Spot partial results via the truncated flag and raise the limit to capture complete error trails.

Instructions

[READ] Canned error-level read for a stream selector (error line-filter).

Args: selector: A Loki stream selector (e.g. '{app="api"}' or 'app="api"'). hours: Lookback window in hours (capped at the tool's max lookback). limit: Max log lines to return (clamped to the tool's max line limit). target: Loki target name from config; omit for the default.

Returns an envelope with returned/limit/truncated. If truncated is true the result is partial — re-run with a higher limit.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hoursNo
limitNo
targetNo
selectorYes
Behavior4/5

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

No annotations exist, so the description carries the transparency burden. It discloses the read-only nature via '[READ]', clamping/capping behavior for hours and limit, and details the return envelope including 'truncated' semantics with guidance to re-run with a higher limit. This is solid behavioral disclosure, though it does not discuss auth or rate limits.

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 front-loaded with the core purpose, followed by a concise parameter list and return semantics. Every sentence provides necessary information with no fluff or redundancy.

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

Completeness5/5

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

For a simple 4-parameter read tool with no output schema, this description covers the operational behavior completely: input parameters, limits, return shape, and how to handle truncation. It is self-sufficient and does not require additional context.

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 fully explains each parameter: selector with examples, hours as a capped lookback, limit as clamped max lines, and target as an optional config name. This adds essential meaning beyond the bare schema properties.

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 'canned error-level read' for a stream selector, with a specific verb (read), resource (Loki stream selector), and scope (error-level line filter). This distinguishes it from the general loki_query sibling and other alert/log tools.

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 only implied—'canned error-level read' suggests when to use it (for error-level logs) but no explicit when-not-to-use or alternative tool is mentioned. It lacks direct comparative guidance against siblings like loki_query or alert_log_context.

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