Skip to main content
Glama
Fato07
by Fato07

log_analyzer_search

Read-onlyIdempotent

Find specific patterns in log files using regex or plain text. Filter by log level (ERROR, WARN, etc.), adjust context lines, and limit matches. Output results in markdown or JSON format.

Instructions

Search for patterns in a log file with context lines.

Args:
    file_path: Path to the log file to search
    pattern: Search pattern (regex or plain text)
    is_regex: Treat pattern as regex (default: False, plain text)
    case_sensitive: Case-sensitive search (default: False)
    context_lines: Lines of context before/after match (0-10, default: 3)
    max_matches: Maximum matches to return (1-200, default: 50)
    level_filter: Filter by log level (ERROR, WARN, INFO, DEBUG)
    response_format: Output format - 'markdown' or 'json'

Returns:
    Search results with matches and surrounding context.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes
patternYes
is_regexNo
case_sensitiveNo
context_linesNo
max_matchesNo
level_filterNo
response_formatNomarkdown

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

Annotations already indicate readOnlyHint=true and destructiveHint=false. The description merely restates the search action without adding behavioral details like file system access, performance implications, or response handling. It adds minimal value beyond annotations.

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?

The description is well-structured with a clear opening sentence, an Args list, and a Returns section. It is concise for the number of parameters, though some details (like default values) could be inferred from the schema. No unnecessary words.

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?

Given that an output schema exists (context signal), the description appropriately summarizes the return value. It covers all required parameters and optional filters. However, it omits edge cases (e.g., file not found, large files) and performance hints, which could be useful for a search tool.

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%, so the description carries the full burden. It explains all 8 parameters with clear meanings (e.g., 'file_path: Path to the log file to search'), valid ranges, and defaults. This adds significant meaning beyond the schema's type-only definitions.

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 'Search for patterns in a log file with context lines,' specifying the verb (search) and resource (log file). It distinguishes itself from sibling tools like log_analyzer_tail (tail logs) and log_analyzer_extract_errors (extract errors).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, such as log_analyzer_tail or log_analyzer_ask. It lacks explicit when-to-use or when-not-to-use context, leaving the agent without decision support.

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/Fato07/log-analyzer-mcp'

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