Compress Memory Bank (CLAUDE.md, .cortex/memory-bank/*.md)
compress_memory_bankCompress project memory files to reduce session token costs. Creates .original backups and validates structural integrity before overwriting, returning per-file compression ratios.
Instructions
Compress project memory files (CLAUDE.md, .cortex/memory-bank/*.md) to reduce session token cost. Creates .original backups; validates structural integrity before overwriting. Returns per-file compression ratios.
USE WHEN: Attached projects need shorter CLAUDE.md / memory-bank prose after cortex://analysis flags compression candidates, or before long sessions.
DO NOT: Run on source code, tests, or user-facing docs outside memory paths.
EXAMPLES:
compress_memory_bank() — zero-arg uses MCP workspace root
compress_memory_bank(project_root="/path/to/project")
RETURNS: JSON with status and result (CompressMemoryBankResult fields).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "compress_memory_bank"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_root | No |