Crush a file to a token budget
crush_fileReads and compresses oversized local files to fit a token budget, auto-escalating compression until the output meets the target. Returns compressed content, token savings, and a reversible reference.
Instructions
Shortcut for the common 'this file is too big to read' case: reads a local file and compresses it in one call. With targetTokens, auto-escalates the pipeline until it fits; otherwise applies the default lossless-ish pipeline. Returns the compressed payload, exact BPE savings, and a reversible ref.
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": {
"path": "<path>"
},
"name": "crush_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Local file to read and compress. | |
| targetTokens | No | Token budget — auto-escalate until output fits. | |
| mode | No | Compression regime (default auto). |