redcon_run
Run shell commands, returning compressed, token-bounded output for LLM analysis. Preserves error details from test suites, git diffs, builds, and coverage.
Instructions
Run a shell command and return its output compressed for LLM consumption (pytest, git diff/status/log, builds, coverage and more). Use instead of a raw shell when output may exceed a screenful; token caps are hard and failures keep their essential detail. DISABLED by default; set REDCON_MCP_ENABLE_RUN=1 to enable.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory | . |
| command | Yes | Full command line, e.g. 'git diff HEAD' | |
| quality_floor | No | Lowest acceptable detail level | compact |
| timeout_seconds | No | Kill the command after this many seconds | |
| remaining_tokens | No | Remaining budget hint (drives compression aggressiveness) | |
| max_output_tokens | No | Hard cap on tokens returned | |
| semantic_fallback | No | Enable the LLMLingua-2 semantic compression fallback for commands that no schema-specific compressor recognised. Requires the optional redcon[heavy_compression] extra (torch + transformers + ~280 MB BERT-base checkpoint). Silently falls through to plain passthrough when the extra is missing. | |
| prefer_compact_output | No | Rewrite known commands to runner-native compact flags (pytest --tb=line, cargo --quiet, jest --reporter=basic) before spawning. Trades full tracebacks for ~60-80% upstream reduction on test-failure runs. |