memento_compact
Compress natural-language text to save tokens while preserving code, URLs, and file paths. Applies rule-based strategies to fit text within a token budget without LLM calls.
Instructions
Compress natural-language text to save tokens while preserving technical substance (code, URLs, file paths). Strategies: truncate, caveman, graphify, ponytail. 'caveman' applies the MIT-licensed caveman-compress rule-based tersification; 'truncate' hard-cuts at the token budget; 'graphify'/'ponytail' are native token-light heuristics. No LLM call.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"text": "<text>"
},
"name": "memento_compact"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The text to compact. | |
| strategy | No | Compaction strategy (default: caveman). | caveman |
| max_tokens | No | Approximate token budget for the output (default: 60). | |
| workspace_root | No | MANDATORY: The absolute path of the current project/workspace root. |