compress_text
Compress raw text, chat transcripts, or logs into a structured context capsule with a configurable token budget, preserving key information for efficient LLM handoffs.
Instructions
Compress raw text into a Context Diamond capsule.
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": "compress_text"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| budget | No | Target section token budget. | |
| title | No | Capsule title. | OpenCode Context Capsule |
| format | No | markdown | |
| loss_report | No | Include kept/omitted shard audit data in JSON metadata. | |
| tokenizer_profile | No | generic | |
| text | Yes | Raw text, chat transcript, logs, or notes to compress. |