Skip to main content
Glama
Fato07
by Fato07

log_analyzer_search

Read-onlyIdempotent

Search log files for patterns with context lines, using regex or text matching with filters for log levels and output formats.

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
Behavior3/5

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

Annotations already cover key behavioral traits (readOnlyHint=true, destructiveHint=false, idempotentHint=true), so the bar is lower. The description adds useful context about returning matches with surrounding context, but doesn't mention rate limits, authentication needs, or error conditions.

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 efficiently structured with a clear opening sentence followed by organized 'Args' and 'Returns' sections. Every sentence earns its place by providing essential information without redundancy.

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 the tool's complexity (8 parameters) and the presence of an output schema (which handles return values), the description is quite complete. It thoroughly documents parameters and purpose, though it could benefit from more behavioral context and usage guidance relative to siblings.

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?

With 0% schema description coverage, the description fully compensates by explaining all 8 parameters in detail, including their purposes, default values, and constraints (e.g., '0-10' for context_lines, '1-200' for max_matches). This adds significant meaning beyond the bare schema.

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 the tool's purpose with specific verbs ('search for patterns') and resources ('in a log file with context lines'), distinguishing it from siblings like 'extract_errors' or 'summarize' by focusing on pattern matching with context.

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?

No guidance is provided on when to use this tool versus alternatives like 'log_analyzer_ask', 'log_analyzer_correlate', or 'log_analyzer_scan_sensitive'. The description only explains what the tool does, not when it's appropriate.

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