Skip to content

Tools ​

Me Write Code ships seven built-in tools, plus dynamic tools loaded from MCP servers and skills. All tool output is run through Caveman Mode compression before re-entering the model's context.

Built-in tools ​

ToolPurposeDefault mode access
ReadRead a file or range of linesalways
Find / LsLocate files and list directoriesalways
GrepSearch file contents (ripgrep-backed)always
BashRun shell commandsgated by sandbox/approval settings
EditFind/replace edit on a filegated by approval settings
WriteWrite a filegated by approval settings
Task / AgentDispatch a subagentalways

Plan mode restricts to read-only tools (Read, Find, Ls, Grep, and safe Bash). Enable with /plan in the TUI. See Plan Mode.

Caveman Mode compression ​

Four compression layers reduce repeated and verbose context. Exact savings depend on provider, model, and task; the public benchmark is under revalidation.

LayerWhat happensImpact
Caveman ModeModel responds in terse technical fragments. Levels: lite, full, ultra.Prompt + response compression
Tool BudgetsPer-tool line limits (bash: 80, read: 300, grep: 120) + ANSI strip + blank collapse + semantic JSON/XML extraction-67% to -94% on tool output
Read DedupFiles fingerprinted per session — re-reads return a stub, not the content-99% on repeated reads
RTKOptional Rust binary rewrites bash output before it enters context~60% additional reduction

Per-tool budgets ​

json
{
    "tools": {
        "budgets": {
            "bash": { "maxLines": 80, "stripAnsi": true },
            "read": { "maxLines": 300, "dedupeAcrossSession": true },
            "grep": { "maxLines": 120 }
        }
    }
}

Override per session with --max-tool-lines 200. Override globally in ~/.mewrite/agent/settings.json.

Cost transparency ​

Per-message inline:

[$0.0042 (cached: $0.0001)] Sonnet 4 · 12,431 in / 412 out

Session summary on /exit:

session: 32 turns · 2h 14m
total: $1.84 — cache + compression savings reported separately
breakdown:
  system    +1,200 tokens
  repomap     +840
  history  +12,150
  files     +8,421
  tools    +18,902 (compressed)

/tokens opens a live breakdown panel.

Daily/weekly totals persist locally and include completed assistant messages from active, unclosed sessions. Legacy closed-session totals live in ~/.cave/cost-totals.json; new per-message records live in ~/.cave/cost-ledger.jsonl. After upgrade, pre-upgrade turns in still-open sessions are not backfilled and may remain missing from /cost; new completed assistant messages are counted going forward.

ToolSearch (deferred MCP schemas) ​

By default, MCP tools are listed by name only. The model fetches the schema via ToolSearch only when needed. This is the same trick Anthropic uses to cut 85% of context bloat.

Registry ​

Provider, model, and tool defaults ship with Me Write Code and can be refreshed without upgrading the CLI:

bash
mewrite models update

Override locally in ~/.mewrite/agent/registry.json.

MIT Licensed. Special thanks to pi by Mario Zechner and the cave fork by Julius Brussee, on whose work this builds.