Skip to main content
Glama

Redcon

Deterministic context budgeting for AI coding agents

Stop sending agents 200k tokens of irrelevant code. Redcon scores, compresses, and packs repo context so your agent gets what it actually needs.

PyPI Tests Python 3.10+ VS Code Extension License: FSL-1.1-MIT

Install - Quick Start - How It Works - Docs


The Problem

AI coding agents burn tokens on irrelevant context. You either:

  • Dump the whole repo and pay for 200k input tokens per request, or

  • Let the agent grep blindly and waste tool calls figuring out where to look

Redcon solves both. It ranks files by task relevance, compresses them with language-aware strategies (full, snippet, symbol extraction, summary), and packs the result under your token budget. Deterministic, local-first, no embeddings. One MCP server covers Claude Code, Cursor, Windsurf, Cline and Zed; a plain CLI covers CI. Measured on this repository it cuts input tokens by more than 83% at the same task coverage (methodology).

Related MCP server: ContextBridge

Punch above your plan

On a flat subscription - Claude Pro/Max, Cursor, GitHub Copilot - the token bill isn't what stings, the usage limit is. Redcon cuts the tokens each task needs, so the same plan covers far more work before you hit the weekly wall. Same subscription, more runway.

It stretches the budget you already pay for, and reports exactly how much it saved.

Install

Option 1: VS Code Extension (easiest)

  1. Install Redcon - Context Budget from the marketplace

  2. Open the Redcon sidebar, click Install & Set Up

  3. Reload window. Done.

The extension installs the CLI via pip, registers the MCP server for Claude Code, Cursor, and Windsurf, and gives you a sidebar with budget analytics, file rankings, and compression dashboards.

Option 2: CLI + MCP Server

pip install "redcon[mcp]"
redcon init                      # creates redcon.toml + registers MCP

The init command auto-configures MCP for Claude Code, Cursor and Windsurf, plus VS Code, Codex CLI, Gemini CLI, Junie CLI, Cline and Zed when they are detected, so your AI agent can call redcon_rank, redcon_search, redcon_compress, and redcon_budget as native tools. It also writes a short AGENTS.md section that tells agents to prefer these tools for context selection.

Option 3: CLI only

pip install redcon
redcon init --no-mcp

Quick Start

# Rank files relevant to a task
redcon plan "add rate limiting to auth API" --repo .

# Pack context under a token budget
redcon pack "refactor payment flow" --repo . --max-tokens 30000

# Compare compression strategies
redcon benchmark "add caching" --repo .

# Audit a PR for context growth
redcon pr-audit --repo . --base origin/main --head HEAD

Output goes to run.json (machine-readable) and run.md (human-readable). Use them in CI, or feed the compressed context directly into your agent.

For a full end-to-end walkthrough on a realistic service repo (plan, pack, validate, with deterministic output), see examples/service-repo.

How It Works

task: "add rate limiting to auth"
       |
       v
  [1] scan    - incremental scan of repo files (cached)
       |
       v
  [2] rank    - score each file: keyword match, imports, file role, git history
       |
       v
  [3] compress - per-file strategy: full / snippet / symbol extraction / summary
       |
       v
  [4] pack    - fit top-N compressed files under token budget, drop the rest
       |
       v
  run.json + run.md + compressed_context ready for your agent

Every step is deterministic. Same input, same output. No embeddings, no random chunking.

Benchmark: context-eval

Selection quality is measured, not claimed. context-eval/ is an open benchmark for context-selection tools: tasks come from real git commits, ground truth is the files each commit actually modified, and every tool packs the same token budget. Current results (33 tasks, 24k budget):

Tool

Mean coverage

Tokens / coverage point

redcon

43.8%

306.8

keyword-topk (baseline)

29.8%

538.9

aider-repomap (real aider)

15.3%

533.3

pagerank (baseline)

11.4%

720.0

Rerun it on any repo: python context-eval/run.py --repo /path/to/repo. Methodology, limitations, and how to add your own tool: context-eval/README.md.

MCP Integration (Pull Model)

mcp-name: io.github.natiixnt/redcon

Instead of pushing a 30k-token blob to your agent, Redcon exposes 9 MCP tools the agent calls on demand:

Tool

What it does

redcon_rank

Top-K files with scores and reasons - call this first

redcon_overview

Lightweight repo map grouped by directory

redcon_repo_map

Top ranked files plus their code signatures, fitted under a token budget

redcon_compress

Compressed single-file view for cheap inspection

redcon_search

Regex search scoped to ranked files or full repo

redcon_structural_search

ast-grep structural search - patterns match the AST, not text

redcon_budget

Plan fitting files within a token budget

redcon_run

Run a shell command, return its output compressed

redcon_quality_check

Run a command and verify the compressed output against the quality harness

Typical agent flow uses ~5k tokens for exploration instead of 30k for a blob. The agent itself decides what to read in full.

Config gets written automatically to:

  • .mcp.json (Claude Code)

  • .cursor/mcp.json (Cursor)

  • ~/.codeium/windsurf/mcp_config.json (Windsurf)

Command Output Compression

Source files are only half the bloat. The other half is command output: git diff, pytest, cargo test, grep, ls -R. Redcon's redcon_run MCP tool (and redcon run CLI) wraps the call, parses the output, and returns a budget-aware compressed view that preserves every fact the agent actually needs.

Headline reductions on representative inputs:

Compressor

Fixture

Raw tokens

Compact

Ultra

git diff

12 files, 240 hunks

8,078

97.0%

99.5%

pytest

30 failures + 200 passes

2,555

73.8%

99.2%

grep/rg

600 matches across 50 files

7,015

76.9%

99.9%

find

500 paths

3,398

81.3%

99.8%

ls -R

30 dirs x 15 files

1,543

33.5%

99.0%

kubectl events

200-row CrashLoopBackOff

~5,000

91.5%

99.5%

py-spy collapsed

200 stacks

2,385

90.0%

99.0%

json-line log

200 NDJSON records

6,038

91.1%

98.0%

coverage report

50-file grid

738

73.2%

95.0%

psql EXPLAIN ANALYZE

11-node Postgres plan

435

71.3%

93.3%

Quality is enforced separately. Every compressor declares must_preserve_patterns (file paths in a diff, failing test names in pytest, branch name in git status, slowest node operator in EXPLAIN); the M8 quality harness rejects any compressor whose compact output drops a fact present in the raw input. Run it as a CI step:

redcon cmd-quality   # exits non-zero if any compressor regressed
redcon cmd-bench     # markdown table; --json for CI baselines
redcon run "git diff" --quality-floor compact --max-output-tokens 4000

Twenty compressors ship today: git_diff, git_status, git_log, pytest, cargo_test, npm_test (vitest+jest), go_test, grep, ls, tree, find, lint (ruff+mypy), docker, pkg_install (pip+npm+yarn), kubectl_get/kubectl_events, profiler (py-spy+perf), json_log, coverage, sql_explain (Postgres+MySQL TREE), bundle_stats (webpack + esbuild metafiles). Full per-schema benchmarks: docs/benchmarks/cmd/.

Cross-call dimension

Beyond per-call compression, four layers compose across an agent session:

  • Path aliases (V41): repeated paths like redcon/cmd/pipeline.py collapse to f001 on later mentions. Lazy first-use, never net-negative.

  • Content reference ledger (V43): paragraph-shaped blocks above 6 cl100k tokens get session-stable {ref:001} aliases on second-and-later occurrences. Empirically 23% of session output had block-level overlap.

  • Symbol aliases (V49): CamelCase types / multi-word snake_case identifiers (>=8 chars) collapse to c001 aliases the same way paths do. Empirically 72% of distinct symbols recur >=2 times per session.

  • Snapshot delta vs prior call (V47): when the same argv runs twice, ship only the delta. Schema-aware renderers for pytest (set-diff over failure names), git_diff (file-set with per-file +/- counts), and coverage (per-file pp moves) win meaningfully over generic line-diff. Always picks min(cost_delta, cost_abs) so non-regressive by construction.

  • Invariant cert (V93): every COMPACT/VERBOSE output stamps mp_sha=<16hex> over the sorted multiset of (pattern, capture) extracted from raw. Auditors recompute the cert against the compressed text to detect spurious additions or capture thinning - upgrades the existing must-preserve boolean to set-equality.

Empirical measurement on 5 simulated agent sessions (benchmarks/measure_sessions.py): the cross-call layers add +8.3% session-level saving on top of the per-call compressors, with +15% on heavy-overlap sessions (debugging, search-and-edit) and near-zero on distinct-content sessions. V85 adversarial GA fuzzer ratchets all 20 schemas as a hard CI gate (REDCON_V85_ENFORCE=1).

VS Code Extension

Once installed you get:

  • Sidebar chat: type a task, send, watch the pack run live

  • Dashboard: donut/pie/bar charts for budget, strategies, token impact per file

  • Status bar: current budget usage with risk indicator

  • CodeLens: compression strategy and token count shown above each file

  • File decorations: relevance score badges on files in the explorer

  • History: browse past runs, diff them, export to clipboard

Branding: red->navy gradient with triple chevron mark, glass-style UI.

Workspaces (Multi-Repo)

One task can span multiple repos. Place the workspace TOML in a folder that contains all the repos (a monorepo root or a common parent directory) - repo paths must resolve inside that folder, so a workspace file cannot reach above itself:

name = "backend-services"

[scan]
include_globs = ["**/*.py", "**/*.ts"]

[budget]
max_tokens = 28000
top_files = 24

[[repos]]
label = "auth-service"
path = "auth-service"

[[repos]]
label = "billing-service"
path = "billing-service"
ignore_globs = ["tests/fixtures/**"]

Artifacts include workspace, scanned_repos, selected_repos, and repo-qualified paths like auth-service:src/auth.py.

See docs/workspace.md.

Python API

from redcon import RedconEngine

engine = RedconEngine()

# Rank files
plan = engine.plan(task="add user auth", repo=".", top_files=15)

# Pack context
result = engine.pack(
    task="add user auth",
    repo=".",
    max_tokens=30000,
    top_files=25,
)
print(f"Used {result['budget']['estimated_input_tokens']} of {result['max_tokens']} tokens")
print(f"Risk: {result['budget']['quality_risk_estimate']}")

for file in result["compressed_context"]:
    print(f"{file['path']}: {file['strategy']} ({file['compressed_tokens']} tokens)")

Full reference: docs/python-api.md.

Features

  • Deterministic scoring: keyword match, import graph, file role (test/docs/prod), git history

  • Language-aware compression: Python, TypeScript, JavaScript, Go, Rust, Java, and more

  • Command output compression: 20 compressors covering git, test runners, grep/rg, listings, lint, docker, pkg-install, kubectl, profilers, JSON logs, coverage, SQL EXPLAIN, and bundle stats - 70-99% reduction at compact level

  • Incremental scanning: cached file metadata with git-aware change detection

  • Multi-repo workspaces: single task, multiple repos, shared config

  • Budget policies: enforce max tokens, quality risk levels, file counts in CI

  • Quality harness: must-preserve regex assertions per compressor, deterministic, robust to truncated/binary input

  • Streaming runner: chunked Popen reader with bounded memory and early SIGTERM/SIGKILL when output cap is hit

  • Run history: SQLite-backed artifact store for both file packs and command runs, diff/heatmap/drift analysis

  • Cost analysis: estimate token costs across GPT-4o, Claude, and other models

  • PR auditing: detect context growth in pull requests

  • Plugin system: custom scorers, compressors, token estimators, summarizers

  • Cache backends: in-memory, local file, Redis

  • Doctor command: diagnose environment, Python version, disk space, git availability

Documentation

License

Everything in this repository is licensed under the Functional Source License, FSL-1.1-MIT: use it freely for any purpose except building a competing commercial product or service. Each release automatically becomes MIT-licensed two years after it ships.

The hosted Redcon Cloud control plane (orgs, quotas, usage metering, billing, team dashboards) is separate commercial software maintained in a private repository.

Commercial licensing: natjiks@gmail.com

Available Tools

9 tools
redcon_budgetA

Plan how to fit a set of files under a token budget, choosing a compression strategy per file. Use before reading several files at once; returns per-file token costs, strategies, and which to drop.

ParametersJSON Schema
NameRequiredDescriptionDefault
repoNo.
taskYesTask description
filesYesRelative paths of files to fit
max_tokensYesTotal token budget

TDQS

A4/5.0
Behavior3/5

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

The description discloses that the tool returns per-file token costs, strategies, and which files to drop, which is useful behavioral information. However, since no annotations are provided, the description carries the full burden and does not explicitly state whether the tool performs read-only analysis or has side effects. It also doesn't mention any permissions or rate limits.

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 two sentences, front-loaded with the core purpose and usage guidance. Every clause adds value; no filler.

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?

The description covers the main purpose, usage timing, and return values, which is important since there is no output schema. It lacks details on the compression strategies or how token costs are computed, but it is sufficient for an agent to know when to invoke this tool.

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

Parameters3/5

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

The input schema already provides descriptions for files, max_tokens, and task (75% coverage), and the description adds context about the tool's planning purpose. It doesn't elaborate on the repo parameter or provide additional parameter semantics beyond what the schema offers.

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's function: planning how to fit files under a token budget and selecting compression strategies per file. It mentions specific outputs (per-file token costs, strategies, and files to drop), and the verb 'Plan' distinguishes it from sibling tools like redcon_compress that likely execute compression.

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 explicitly says 'Use before reading several files at once', providing a clear usage scenario. It doesn't name alternative tools but implies when to use it relative to reading files. It could be improved by mentioning what not to use it for.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

redcon_compressA

Task-scoped compressed view of one file (signatures, imports and the relevant sections), typically 3-10x fewer tokens. Prefer this over reading a whole file; fetch the full file only if it is insufficient.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYesRelative path to the file
repoNo.
taskYesTask description
max_tokensNoMax tokens for compressed output

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the transparency burden. It discloses the tool's behavior: produces a compressed view, reduces tokens 3-10x, includes specific content, and may be insufficient compared to full file. This is useful but doesn't cover error conditions or exact output structure.

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 two sentences with no waste. The first sentence states the purpose and key characteristics; the second gives clear usage guidance. It is appropriately front-loaded.

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?

The description is sufficiently complete for a simple read/compress tool. It explains what the tool does, what the output includes, and when to use it. The lack of output schema is mitigated by describing the content types. It doesn't explain the exact return format, but that's not critical for selection/invocation.

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

Parameters3/5

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

Schema description coverage is 75% (3 of 4 params described). The description adds the concept of 'task-scoped' to clarify the task parameter's role and mentions token reduction related to max_tokens. However, it doesn't meaningfully expand on path or repo beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool generates a 'task-scoped compressed view of one file' with a specific content set (signatures, imports, relevant sections) and token reduction. However, it does not explicitly name sibling tools for differentiation, so it's clear but not maximally distinguishing.

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 gives explicit usage guidance: 'Prefer this over reading a whole file; fetch the full file only if it is insufficient.' This clearly states when to use this tool versus the alternative of reading the full file, though it doesn't address when to choose other redcon siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

redcon_overviewA

Lightweight repository map grouped by directory, filtered to the task's modules. Use to orient instead of ls -R or find; costs a few hundred tokens. For signatures, use redcon_repo_map.

ParametersJSON Schema
NameRequiredDescriptionDefault
repoNo.
taskYesTask description

TDQS

A4.4/5.0
Behavior4/5

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

No annotations are provided, so the description carries the burden. It discloses key behavioral traits: lightweight nature, cost (a few hundred tokens), and task-based filtering. It does not explicitly state whether the operation is read-only, but the 'map' phrasing implies a safe read operation. This is good value beyond the schema.

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?

Two sentences, front-loaded with the core purpose, and every phrase earns its place. No filler or repetition.

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?

For a simple overview tool with no output schema, the description covers what it does, when to use it, cost, and alternatives. It does not describe the output format in detail, but the concept of a 'map' is straightforward. It is sufficiently complete for an agent to make a confident selection decision.

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

Parameters3/5

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

Schema description coverage is 50%; only 'task' is described in the schema. The description itself doesn't detail parameters but does tie 'task' to module filtering. The 'repo' parameter lacks any description but has a default value, reducing ambiguity. The description adds marginal value, but not enough to fully compensate for the gap.

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 produces a lightweight repository map grouped by directory and filtered to the task's modules. It explicitly differentiates from the sibling tool redcon_repo_map by noting that one should use that tool for signatures.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives explicit usage guidance: 'Use to orient instead of ls -R or find' and 'For signatures, use redcon_repo_map.' This tells the agent exactly when to invoke this tool and what alternative to choose for a different need.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

redcon_quality_checkA

Run a shell command, compress its output, and verify the compression against the M8 quality harness. Use instead of redcon_run when you want a structured pass/fail verdict on the compression.

ParametersJSON Schema
NameRequiredDescriptionDefault
cwdNo.
commandYes
quality_floorNocompact
timeout_secondsNo
remaining_tokensNo
max_output_tokensNo
prefer_compact_outputNo

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses that a shell command is executed and output is verified, but it omits safety implications, expected output format, or how the verification works. The disclosure is moderate but not rich.

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?

Two sentences with no filler. The core behavior and usage alternative are front-loaded, making it concise and well-structured.

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

Completeness2/5

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

Given 7 parameters, no output schema, and no annotations, the description is underspecified. It lacks parameter details, return format, constraints, and environment assumptions. This is minimal for a complex execution tool.

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

Parameters1/5

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

Schema description coverage is 0%, and the description does not explain any of the 7 parameters (command, cwd, quality_floor, timeout_seconds, etc.). The mention of compression is vague and does not map to any parameter.

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 states a clear action sequence: run a shell command, compress its output, and verify against the M8 quality harness. It also distinguishes itself from sibling redcon_run by specifying when to use it for a structured pass/fail verdict.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says to use instead of redcon_run when a structured pass/fail verdict is needed, providing a direct alternative and use context. This gives clear guidance on tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

redcon_rankA

Rank repository files by relevance to a task. Call this FIRST on a new task, before grepping or reading: it returns the top-K paths with scores and reasons. Follow up with redcon_compress on the top hits.

ParametersJSON Schema
NameRequiredDescriptionDefault
repoNoRepository path (default: current directory).
taskYesDescription of what you're working on
top_kNoNumber of top files to return

TDQS

A4/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden. It does disclose the key output ('top-K paths with scores and reasons') and its workflow role, but it doesn't explicitly state whether the operation is read-only, whether it has side effects, or any cost/performance implications. This is adequate but not rich.

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 two sentences, front-loaded with purpose and usage, and contains no filler. Every phrase serves a purpose: it explains what the tool does, when to call it, what it returns, and what to do next.

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?

For a relatively simple tool with three parameters, no output schema, and no annotations, the description covers the essential context: purpose, invocation order, return content, and next step. It could further elaborate on output format or edge cases, but the description is sufficient for selection and invocation.

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

Parameters3/5

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

The input schema already has 100% coverage with descriptions for repo, task, and top_k. The description only adds 'top-K' without providing any additional parameter syntax, defaults, or nuances beyond the schema, so the baseline score of 3 applies.

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 opens with a specific verb and resource: 'Rank repository files by relevance to a task.' It clearly differentiates from siblings by positioning itself as the first step—'Call this FIRST'—and by referencing a follow-up tool, redcon_compress, while implicitly distinguishing from grep/reading actions.

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?

It explicitly states when to use: 'Call this FIRST on a new task, before grepping or reading' and provides a clear follow-up instruction. The guidance is strong on timing and context, but it doesn't explicitly list situations where an alternative sibling should be preferred beyond the grep/reading contrast.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

redcon_repo_mapA

Repo map: top ranked files plus their class and function signatures with line numbers, under a token budget. Use for code structure across many files at once. Degrades to a path-only listing without the redcon[symbols] extra.

ParametersJSON Schema
NameRequiredDescriptionDefault
repoNo.
taskYes
budgetNo
top_filesNo

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose key behavior: the output is token-budgeted and it degrades to a path-only listing without the redcon[symbols] extra. This gives the agent clear expectations, though it does not explicitly state that the operation is read-only, which is implied.

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 three concise sentences that lead with the tool's purpose, then cover usage and degradation behavior. There is no redundant or filler content.

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

Completeness3/5

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

The description covers the core output and usage context, but the required 'task' parameter is undefined, and the ranking criteria for 'top ranked' are opaque. With no output schema or annotations, the agent still faces ambiguity about the expected input and details of the result.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate. It indirectly explains 'budget' via 'token budget' and 'top_files' via 'top ranked files', but the required 'task' parameter is left entirely unexplained, leaving a significant gap for correct invocation.

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 that the tool generates a repo map with top-ranked files, class/function signatures, and line numbers under a token budget. The phrase 'Use for code structure across many files at once' distinguishes it from sibling tools by specifying its broad scope.

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?

It provides an explicit usage context: 'Use for code structure across many files at once.' This tells the agent when to select this tool, though it does not mention specific alternatives or circumstances where it should not be used.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

redcon_runA

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.

ParametersJSON 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.

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations provided, the description carries the full transparency burden. It discloses compression behavior, hard token caps, failure detail preservation, and the default-disabled status. However, it does not explicitly warn about potential side effects of arbitrary command execution (e.g., file modifications, network access), which is a notable omission for a command runner.

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 compact and front-loaded, starting with the core action and purpose. Each of the three sentences adds valuable information: what the tool does, when to use it, and a critical configuration note. No words are wasted.

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 the tool's complexity (8 parameters, no output schema, no annotations), the description provides a solid overview with purpose, usage criteria, and enablement. It does not fully describe the return format or handling of edge cases, but the high schema coverage compensates for missing parameter details. A brief caution about command side effects would improve completeness.

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

Parameters3/5

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

The input schema provides 100% coverage for all parameters with detailed descriptions, so the baseline is 3. The tool description adds little beyond the schema; it mentions compression and token caps but does not elaborate on parameters like quality_floor or semantic_fallback. No additional semantics are provided.

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's function: 'Run a shell command and return its output compressed for LLM consumption,' naming specific use cases (pytest, git, builds, coverage). It distinguishes the tool from siblings that perform static repository analysis by emphasizing command execution and output compression.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says 'Use instead of a raw shell when output may exceed a screenful,' giving a clear condition for when to choose this tool. It also notes the critical prerequisite 'DISABLED by default; set REDCON_MCP_ENABLE_RUN=1 to enable,' which is essential for correct invocation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 9 tool updatesv0.1.0
    • First observedredcon_budget
    • First observedredcon_compress
    • First observedredcon_overview
    • First observedredcon_quality_check
    • First observedredcon_rank
    • First observedredcon_repo_map
    • First observedredcon_run
    • First observedredcon_search
    • First observedredcon_structural_search

TDQS

A3.9/5.0
Disambiguation4/5

Most tools have clearly distinct purposes: repo_map provides ranked file signatures, overview gives directory grouping, rank prioritizes files, compress condenses a file, search and structural_search differ by regex vs AST, and budget plans token allocation. The only notable overlap is between redcon_run and redcon_quality_check, both of which run shell commands and compress output, but their verification approaches differ.

Naming Consistency3/5

All tools share the redcon_ prefix and use snake_case, but the second part mixes nouns (repo_map, overview, budget) and verbs (rank, compress, search, run) without a consistent verb_noun pattern. This makes the API slightly less predictable, though still readable.

Tool Count5/5

9 tools is well-scoped for a code exploration and compression server. Each tool covers a distinct phase of the workflow—ranking, mapping, searching, compressing, budgeting, and running commands—without unnecessary bloat or gaps.

Completeness4/5

The tool surface covers the core workflows: orientation (overview), relevance ranking (rank), structural mapping (repo_map), searching (search, structural_search), file compression (compress), budget planning (budget), and command execution (run, quality_check). A direct full-file read is absent, but that is intentional given the server's compression-focused design, so the gap is minor.

Maintenance

ActivityMaintained
ResponsivenessResponsive

Related MCP Connectors

Related MCP Servers

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