compress
Reduce bloated tool output or long text to fit a token budget while preserving content relevant to an optional query. Returns a compact extract with a reference to retrieve the full output later.
Instructions
Compress a bloated tool output or long text so it fits a token budget while keeping what's relevant to an optional query. Returns a compact extract; the full output stays retrievable via the ref in its footer — call expand_tool_output with that ref to read it back.
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"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | the tool output / long text to compress | |
| query | No | optional relevance query — keep what's on-topic for this | |
| max_tokens | No | token budget (default 512) |