Skip to main content
Glama
mcp-root-cause-detective

mcp-root-cause-detective

by tarihte1110

analyze_log_files

Read-onlyIdempotent

Read multiple log files using glob patterns, correlate root causes across them, and return an analysis ID for drill-down into error clusters and request flows.

Instructions

Birden fazla log dosyasını (.log, .txt, .jsonl, .gz) okur ve kök neden korelasyonu yapar.

Glob desenlerini (ör. ./logs/*.log) destekler, dönen analysis_id ile sonraki drill-down araçlarına (inspect_error_cluster, trace_request_flow) bağlanabilir.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "file_paths": "<file_paths>"
    },
    "name": "analyze_log_files"
  }
}

Input Schema

NameRequiredDescriptionDefault
file_pathsYes
tail_linesNo
window_secondsNo

Output Schema

NameRequiredDescriptionDefault
errorNo
warningsNo
analysis_idNoAşamalı inceleme (drill-down) araçlarında kullanılacak oturum kimliği.
error_spikesNo
sources_scannedNo
total_errors_foundNo
trace_correlationsNo
stacktrace_insightsNo
timed_entries_countNo
total_lines_scannedNo
root_cause_hypothesesNo
timeline_correlationsNo
unique_error_clustersNo
untimed_entries_countNo
mermaid_sequence_diagramNoÇoklu servis olay akışını görselleştiren Mermaid sequenceDiagram metni.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false and openWorldHint=false, so safety is covered. The description adds information annotations cannot carry: which file extensions are parsed, that glob patterns like ./logs/*.log are accepted, and that an analysis_id is emitted for chaining into downstream tools. It says nothing about size/volume limits or partial-failure behavior on unreadable files.

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?

Two tight sentences with zero filler: the first states the operation and the input formats, the second explains input syntax and the output handoff. Nothing is repeated from the name or annotations, and the most decision-relevant facts come first.

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

Completeness3/5

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

The tool is a read-only entry point with an output schema, so return-value documentation is rightly omitted, and the analysis_id chaining story is present. What is missing is meaning for tail_lines and window_seconds — two knobs an agent must set correctly to get useful correlation results, and neither the schema nor the description explains them.

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

Parameters2/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 carry the parameter burden and it only partly does: the glob-pattern note genuinely clarifies how file_paths entries may be written. The two remaining parameters, tail_lines (default 1000) and window_seconds (default 5), get no explanation at all — it is unclear whether window_seconds is the correlation window or a per-file tail window, which directly affects how an agent should set them.

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?

The description gives a specific verb and resource ('Birden fazla log dosyasını okur' – reads multiple log files) plus the actual analysis goal ('kök neden korelasyonu' – root-cause correlation), and lists the accepted formats (.log, .txt, .jsonl, .gz). It also positions itself as the entry point ahead of inspect_error_cluster and trace_request_flow, so it is distinguishable from those siblings.

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 clearly states the workflow: call this first, then pass the returned analysis_id into the drill-down tools it names explicitly. That is real routing guidance. It stops short of stating when NOT to use it or how it relates to the non-log siblings (analyze_docker_containers, correlate_with_git_changes, etc.), so no exclusion criteria are provided.

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