Skip to main content
Glama

redcon_run

Run shell commands and get compressed output with guaranteed token limits. Use for test runs, diffs, and logs to avoid overwhelming LLM context.

Instructions

Run a shell command and return its output compressed for LLM consumption via schema-aware compressors (pytest, git diff/status/log, builds, coverage, kubectl and more). Use INSTEAD of a raw shell whenever output may exceed a screenful - test runs, diffs, logs. The token caps are hard guarantees, and failures keep their essential detail (failing test names, error lines). DISABLED by default because it executes commands; set REDCON_MCP_ENABLE_RUN=1 on the server to enable it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoWorking directory.
commandYesFull command line, e.g. 'git diff HEAD'
quality_floorNoLowest acceptable detail levelcompact
timeout_secondsNoKill the command after this many seconds
remaining_tokensNoRemaining budget hint (drives compression aggressiveness)
max_output_tokensNoHard cap on tokens returned
semantic_fallbackNoEnable 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_outputNoRewrite 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.
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It explains that output is compressed, token caps are hard guarantees, failures keep essential details (failing test names, error lines), and the tool is disabled by default because it executes commands. This covers key behavioral traits but lacks details on security sandboxing or environment isolation.

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 a single, well-structured paragraph that front-loads the core purpose, then gives usage guidance, behavioral details, and safety note. Every sentence adds value—no redundancy or filler. It is concise yet comprehensive.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 8 parameters, full schema coverage, and no output schema, the description covers compression behavior, token guarantees, error handling, and safety. It could be more explicit about the exact return format (e.g., is it plain text or JSON?), but the mention of 'compressed for LLM consumption' and 'schema-aware compressors' implies a structured format. Overall, it provides sufficient context for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. The description adds value beyond the schema by explaining the purpose of `semantic_fallback` (requires optional extra) and `prefer_compact_output` (rewrites commands for compact flags). This extra context helps agents understand trade-offs. Other parameters like `command` and `quality_floor` are adequately described in 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 clearly states the tool runs a shell command and returns compressed output. It uses specific verb+resource ('Run a shell command') and distinguishes itself from raw shell by indicating it should be used when output may exceed a screenful. Lists specific use cases like test runs, diffs, logs, which differentiates it from sibling tools that are about overview or quality checks.

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 explicit guidance on when to use the tool: 'Use INSTEAD of a raw shell whenever output may exceed a screenful'. It also notes that the tool is disabled by default for safety. However, it does not explicitly state when NOT to use it (e.g., for interactive commands or small outputs), nor does it compare with sibling tools (though they are different purposes).

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/natiixnt/redcon'

If you have feedback or need assistance with the MCP directory API, please join our Discord server