Skip to main content
Glama
fedora-copr

Log Detective MCP

Official
by fedora-copr

extract_log_snippets

Analyze large logs by clustering messages with Drain3 and return representative snippets from text, files, URLs, or compressed archives for faster troubleshooting.

Instructions

Extract representative log snippets using Drain3 clustering.

Analyzes log text by chunking it into logical messages, clustering
similar messages using the Drain algorithm, and returning one
representative snippet per cluster.

Exactly one of log_text, log_path, or log_url must be provided.

Downloaded inputs are limited to 100 MB.
Compressed files (.gz, .bz2, .xz, .zip, .tar, .tar.gz, .tar.bz2,
.tar.xz) are decompressed transparently. Archives must contain
exactly one file. Compression ratios above 100:1 are rejected.

Args:
    log_text: Raw log text to analyze.
    log_path: Path to a log file on disk.
    log_url: HTTP(S) URL to fetch log content from.
    max_clusters: Maximum number of clusters/snippets to extract.
    max_snippet_len: Maximum character length per snippet chunk.
    skip_patterns: Optional list of regex patterns.
        Chunks matching any pattern are excluded before clustering.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
log_urlNo
log_pathNo
log_textNo
max_clustersNo
skip_patternsNo
max_snippet_lenNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.2

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does well: it discloses the 100 MB download limit, transparent decompression of named formats, the single-file archive constraint, and rejection of >100:1 compression ratios. It does not mention authentication, rate limits, or failure/timeout behavior when fetching log_url, leaving a minor gap.

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?

Front-loaded with the purpose and output behavior, followed by input constraints then the Args list. Every sentence earns its place given the 0% schema coverage, and there is no filler or repetition.

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?

An output schema exists, so return values need not be explained, and no annotations exist to offload the behavioral burden. The description covers inputs, input-selection rules, and resource limits adequately for a six-param tool; only edge-case behavior of the URL fetch path is unaddressed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% (only titles and defaults exist), so the description must compensate, and its Args block documents all six parameters with meaning — including the exclusive-or input constraint and what max_clusters, max_snippet_len, and skip_patterns control. The parameter notes are terse, so meaning is added but not exhaustively.

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?

States a specific verb and resource ('Extract representative log snippets') and even names the algorithm and the process (chunk, cluster with Drain, return one snippet per cluster). The resource is distinct from the sibling extract_python_tracebacks, but the sibling is never referenced, so distinction is inferential rather than explicit.

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 gives an important usage constraint ('Exactly one of log_text, log_path, or log_url must be provided'), which tells the agent how to invoke it. However, it offers no guidance on when to choose this tool over extract_python_tracebacks or when this tool is inappropriate; usage context is only implied.

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

Deploy Server

Other Tools