Skip to main content
Glama
snickery

loki-tail-mcp

by snickery

loki_patterns

Mine a container's recent logs for recurring patterns, turning thousands of lines into ranked templates with occurrence counts to summarize what a noisy service is saying.

Instructions

Mine a container's recent logs into recurring patterns — the fastest way to summarize what a noisy service is saying. One call turns thousands of lines into a ranked list of templates (<_> marks the variable parts) with occurrence counts.

container: exact container name (use loki_list_containers / loki_tail_container to find it). minutes: how far back to mine. Default 60.

Requires the Loki pattern ingester; only logs ingested after it was enabled are mined, so a small window right after enablement is normal.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
minutesNo
containerYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations, the description carries the full burden. It discloses the prerequisite of the Loki pattern ingester, the caveat that only logs ingested after its enablement are mined, and the output format (ranked templates with occurrence counts). This is excellent transparency beyond what annotations would provide.

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 appropriately sized, front-loaded with the primary purpose, and each sentence adds value. The parameter explanations are integrated compactly without unnecessary fluff.

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?

Given an output schema exists, the description does not need to detail return values. It covers the use case, prerequisites, parameter meanings, and output format, making it complete for a 2-parameter tool.

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 must explain parameters. It does: 'container: exact container name (use loki_list_containers / loki_tail_container to find it)' and 'minutes: how far back to mine. Default 60.' 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 it 'Mine a container's recent logs into recurring patterns', using a specific verb and resource, and differentiates itself from sibling tools by summarizing noisy logs into templates. This is unique among the sibling tools.

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?

It describes the use case as 'the fastest way to summarize what a noisy service is saying' and tells users how to find the container name using sibling tools. However, it does not explicitly mention when not to use this tool (e.g., for raw log queries) versus alternatives, so it lacks explicit exclusionary guidance.

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/snickery/loki-tail-mcp'

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