log

v1.0.2
io.github.rog0x/log Checked 2 days ago Published 8 months ago

Log parse, filter, analyze for AI agents

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

parse_logs

Parse log content in common formats (JSON, Apache/Nginx, syslog, structured, or custom regex). Returns structured entries with timestamp, level, message, source, and extracted fields.

ParameterTypeDescription
content *stringRaw log content to parse
custom_patternstringCustom regex pattern with named groups: (?<timestamp>), (?<level>), (?<message>), (?<source>)
formatstringLog format to use for parsing. Use 'auto' to detect automatically.
limitnumberMaximum number of entries to return

filter_logs

Filter log entries by level, date range, keyword, regex pattern, or source. Returns matched entries and level counts.

ParameterTypeDescription
content *stringRaw log content to filter
date_fromstringStart date (ISO 8601) for date range filter
date_tostringEnd date (ISO 8601) for date range filter
formatstringLog format
keywordstringKeyword to search for (case-insensitive)
levelsarrayFilter by log levels, e.g. ['ERROR', 'WARN']
limitnumberMaximum number of matched entries to return
regex_patternstringRegex pattern to match against log messages
sourcestringFilter by source/logger name (partial match)

analyze_logs

Analyze log patterns: top 10 most frequent errors, error rate over time, request volume per hour, slowest endpoints (from access logs), and anomaly detection (sudden spikes/drops).

ParameterTypeDescription
content *stringRaw log content to analyze
formatstringLog format

format_logs

Convert logs between formats (JSON, plain text, CSV, table). Supports colorization by level, field extraction, and summary report generation.

ParameterTypeDescription
content *stringRaw log content to format
colorizebooleanApply ANSI color codes based on log level
include_fieldsbooleanInclude extracted fields in plain text output
input_formatstringInput log format
max_message_lengthnumberTruncate messages longer than this
output_formatstringDesired output format
summarybooleanGenerate a summary report instead of formatted output

log_stats

Compute log statistics: total lines, lines per level, date range, unique IPs, top user agents, status code distribution, throughput, and more.

ParameterTypeDescription
content *stringRaw log content to compute statistics for
formatstringLog format
renderedbooleanReturn human-readable rendered output instead of JSON