Skip to main content
Glama
Fato07
by Fato07

log_analyzer_watch

Read-only

Watch log files incrementally by polling for new entries from a specified file position. Begin with position 0 to mark the current end, then use returned positions to fetch only new lines, with optional level and pattern filters.

Instructions

Watch a log file for new entries since a given position.

This enables polling-based log watching. First call with from_position=0
returns the current end-of-file position. Subsequent calls with the
returned position get new entries added since then.

Args:
    file_path: Path to the log file to watch
    from_position: File position to read from. Use 0 for initial call
                   (returns current end position), or use the returned
                   current_position from a previous call.
    max_lines: Maximum lines to read per call (1-1000, default: 100)
    level_filter: Filter by log levels, comma-separated (e.g., "ERROR,WARN")
    pattern_filter: Regex pattern to filter messages
    response_format: Output format - 'markdown' or 'json'

Returns:
    New log entries since the last position, with updated position for
    the next call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes
from_positionNo
max_linesNo
level_filterNo
pattern_filterNo
response_formatNomarkdown

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations already indicate readOnlyHint=true and destructiveHint=false. The description adds behavioral context by detailing the polling workflow and position tracking. No contradictions.

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 concise yet comprehensive, using a well-structured Args/Returns format. It front-loads the purpose and provides necessary details without redundancy.

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?

Given 6 parameters (1 required), no enums, and presence of an output schema, the description thoroughly covers the workflow and parameter roles. It explains the polling mechanism fully, making the tool self-contained.

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 schema description coverage at 0%, the description fully compensates by explaining each parameter: file_path, from_position (with usage instructions), max_lines (with range), level_filter (comma-separated), pattern_filter (regex), and response_format (markdown or json). This adds significant meaning beyond the 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 specifies a precise action: watching a log file for new entries since a position. The verb 'watch' and resource 'log file' are clear. It distinguishes from siblings like log_analyzer_tail by describing a polling mechanism.

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?

The description provides a clear usage pattern: first call with from_position=0, then use returned position. It implies polling-based watching, contrasting with real-time alternatives. However, it doesn't explicitly state when not to use or compare to siblings.

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