Skip to main content
Glama
fedora-copr

Log Detective MCP

Official
by fedora-copr

extract_python_tracebacks

Extract Python tracebacks from log text, files, or URLs and truncate them to a chosen length for easier debugging.

Instructions

Extract Python tracebacks using specialized heuristic.

Analyzes log text and extracts unbroken Python tracebacks.
Traces are truncated to `max_traceback_len` characters.

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_traceback_len: Maximum character length per extracted traceback.
    skip_patterns: Optional list of regex patterns.
        Chunks matching any pattern are excluded.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
log_urlNo
log_pathNo
log_textNo
skip_patternsNo
max_traceback_lenNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.2

TDQS

A4.7/5.0
Behavior5/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 so well: truncation to max_traceback_len, a 100 MB download cap, transparent decompression for a named list of formats, a single-file archive constraint, and rejection of >100:1 compression ratios. These are exactly the non-obvious operational traits an agent cannot infer from the schema.

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

Conciseness4/5

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

Front-loaded with the one-line purpose, then constraints, then Args; nothing is padded or redundant prose. The Args block is somewhat long, but since the schema provides no parameter descriptions it earns its place rather than duplicating structured data.

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?

An output schema exists, so return values need not be explained, and the description covers everything else an agent needs: input selection, size/compression limits, truncation behavior, and filtering. Nothing material for correct invocation is missing.

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 compensate, and it documents all five parameters in the Args block. Non-obvious semantics are added beyond the schema: skip_patterns is described as regex patterns that exclude matching chunks, and max_traceback_len as a per-traceback character cap.

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?

States a specific verb+resource ('Extract Python tracebacks') plus the method ('specialized heuristic') and the input domain ('Analyzes log text'). The scope (unbroken Python tracebacks) is narrow enough that an agent can distinguish it from the sibling extract_log_snippets even without an explicit cross-reference.

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?

Gives an explicit input-selection rule: 'Exactly one of log_text, log_path, or log_url must be provided,' which is real usage guidance an agent needs before calling. It does not, however, state when to prefer this tool over the sibling extract_log_snippets or note any exclusions beyond the input constraint.

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