MCP tool and CLI that reduces log files for AI consumption — strip noise, deduplicate, shorten IDs, fold stack traces
Single tool 'reduce_log' has a comprehensive schema with 23 well-documented parameters covering filtering, pagination, and threshold control. The tool description is detailed and includes usage rules and workflow guidance. However, the schema lacks an explicit documented output structure, and error handling guidance is minimal. The tool name is verb-noun (reduce_log) which is clear. Parameter descriptions are mostly strong (72-char average), but output schema documentation is absent, critical for LLMs to plan downstream steps. Overall: definition is substantially above-average for a single-tool server, but missing the output schema documentation and error recovery guides that would push it to 80+.
Reduces log text for AI consumption (50-90% token reduction). Strips noise, deduplicates, shortens IDs/URLs, folds stack traces. RULES: 1. NEVER ask users to paste logs — direct them to save to a file or use /logdump. 2. NEVER read raw log files with cat/head/tail/Read — use this tool with a `file` param. 3. Redirect verbose command output to a temp file, then call this tool on it. 4. Always include `tail` (200-2000) to cap input size. THRESHOLD: If reduced output exceeds the token threshold (default 1000): - No filters: returns an enhanced summary listing unique errors/warnings with counts and timestamps. Use this to decide which filters to apply next. - With filters: returns the output with a tip on how to narrow further. - With query + ANTHROPIC_API_KEY: LLM extracts only relevant lines within budget. Use break_threshold: true to bypass the gate entirely.
Output schema is not documented. The tool description does not specify what fields are returned, making it difficult for LLMs to chain results to downstream tools or extract specific values.
Error handling lacks recovery guidance. The tool description mentions no error conditions, error classification, or actionable recovery steps. LLMs cannot distinguish retryable from fatal errors.
No confirmation or dry-run pattern for threshold-breaking operations. When break_threshold=true, the tool returns unbounded output which could exceed context limits. No pre-flight check or warning mechanism.
Parameter 'query' requires ANTHROPIC_API_KEY injected via MCP config environment. Storing API keys in MCP config risks exposure in traces and config files. Should use server-side vault/secret injection.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | C | 63 | 2026-07-28+ | v2 |
| 2026-03-09 | D | 51 | - | v1 |
Mutual parameter constraints not explicitly documented. Parameters like 'file' vs 'log_text' are described as alternatives but no explicit statement that exactly one is required. LLMs may pass both or neither.