Parallel Sort
Sort, filter and summarize large log files by timestamp, level or keyword.
claude mcp add --scope project clio-parallel-sort -- clio-kit mcp-server parallel-sort
Install the launcher first. Restart your client after setup. Configuration locations →
Check the connection
clio-kit doctor --server parallel-sort --connect
Checks prerequisites and tool discovery. Test on known input to verify results. Native backends may require additional setup.
Tools
sort_log_by_timestampSort log file lines by timestamps in YYYY-MM-DD HH:MM:SS format.
parallel_sort_large_fileSort large log files using parallel processing with chunked approach.
analyze_log_statisticsGenerate statistics for log files including temporal patterns and log levels.
detect_log_patternsDetect patterns in log files including anomalies and error clusters.
filter_logsFilter log entries based on multiple conditions with logical operations.
filter_by_time_rangeFilter log entries by time range using start and end timestamps.
filter_by_log_levelFilter log entries by log level (ERROR, WARN, INFO, DEBUG, etc.).
filter_by_keywordFilter log entries by keywords with support for multiple keywords and logical operations.
apply_filter_presetApply predefined filter presets like 'errors_only' or 'connection_issues'.
export_to_jsonExport log processing results to JSON format.
export_to_csvExport log entries to CSV format with structured columns.
export_to_textExport log entries to plain text format.
generate_summary_reportGenerate a summary report of log processing results with statistics.
Examples
Replace example paths with your own files and check the returned results.
Sorting and filtering return previews of at most 100 lines and 16,384 UTF-8 bytes. Check truncated and total_result_lines. Set output_file to save every result line; without it, a truncated result has not been saved.
1. Large Log File Sorting and Analysis
I have a large application log file at /var/logs/app.log with millions of entries. Sort this log chronologically and analyze the error patterns.
Tools called:
parallel_sort_large_file- Sort the large log file using parallel processinganalyze_log_statistics- Analyze log statistics and patternsdetect_log_patterns- Detect error patterns and anomalies
This prompt will:
- Use
parallel_sort_large_fileto efficiently sort the large log file with optimal chunk processing - Analyze log statistics using
analyze_log_statisticsfor comprehensive metrics - Detect patterns using
detect_log_patternsto identify issues and trends - Generate sorted output with detailed analysis reports
2. Error Log Filtering and Export
Filter all ERROR and WARN level entries from /var/logs/system.log from the last 24 hours and export to CSV for analysis.
Tools called:
filter_by_time_range- Filter logs by time rangefilter_by_log_level- Filter by ERROR and WARN levelsexport_to_csv- Export filtered results to CSV
This prompt will:
- Filter logs by time range using
filter_by_time_rangefor the last 24 hours - Apply log level filtering using
filter_by_log_levelfor ERROR and WARN entries - Export results using
export_to_csvwith structured columns - Provide filtered dataset ready for analysis
3. Connection Issue Pattern Detection
Analyze /var/logs/network.log for connection timeout patterns and generate a comprehensive report with trend analysis.
Tools called:
filter_by_keyword- Filter for connection-related entriesdetect_log_patterns- Detect timeout patterns and trendsgenerate_summary_report- Create comprehensive analysis report
This prompt will:
- Filter connection-related entries using
filter_by_keywordwith timeout keywords - Analyze patterns using
detect_log_patternsfor anomaly detection - Generate comprehensive report using
generate_summary_report - Provide trend analysis and proactive issue identification
4. Multi-Condition Log Analysis
Find all database connection errors in /var/logs/db.log that occurred during business hours (9 AM - 5 PM) and contain "timeout" or "refused".
Tools called:
filter_by_time_range- Filter for business hoursfilter_by_keyword- Filter for timeout and connection refusedfilter_logs- Apply complex multi-condition filteringanalyze_log_statistics- Analyze filtered results
This prompt will:
- Apply time-based filtering using
filter_by_time_rangefor business hours - Filter by keywords using
filter_by_keywordfor timeout and refused conditions - Combine filters using
filter_logswith logical operators - Analyze results using
analyze_log_statisticsfor comprehensive insights
5. Log Quality Assessment and Cleanup
Analyze the quality of /var/logs/application.log, identify malformed entries, and generate a clean sorted version with quality metrics.
Tools called:
analyze_log_statistics- Assess log quality and identify issuessort_log_by_timestamp- Sort logs chronologicallygenerate_summary_report- Create quality assessment report
This prompt will:
- Assess log quality using
analyze_log_statisticswith quality metrics - Sort logs using
sort_log_by_timestampfor chronological order - Generate quality report using
generate_summary_report - Provide clean dataset with quality improvement recommendations
6. Historical Log Trend Analysis
Analyze error trends in /var/logs/historic.log over the past month, detect anomalies, and export findings to JSON for dashboard integration.
Tools called:
filter_by_time_range- Filter for past monthdetect_log_patterns- Detect trends and anomaliesanalyze_log_statistics- Generate temporal analysisexport_to_json- Export results for dashboard
This prompt will:
- Filter historical data using
filter_by_time_rangefor the past month - Detect trends using
detect_log_patternswith anomaly detection - Analyze temporal patterns using
analyze_log_statistics - Export findings using
export_to_jsonfor dashboard integration