cf_prune
Compresses long text for stable prompt prefixes by deduplicating lines, collapsing whitespace, and truncating to character or line limits, then reports size ratio and dropped line count.
Instructions
压缩你传入的文本,为稳定前缀腾出空间:去重行、压缩空白,按 maxChars / maxLines 双上限截断(默认保留头部),返回修剪前后体积比与丢弃行数。输入只认参数里的 text 字符串,输出是可直接拼进上下文的短文本;【何时调】工具输出很长、要压进上下文又不想破坏前缀稳定性时。要处理结构化行数据用 cf_normalize。白盒日志由服务端自维护(单文件 10MB 轮转、默认保留 7 天,DOBOCACHE_LOG_MAX_MB / DOBOCACHE_LOG_KEEP_DAYS 可调),体积无需人工干预。
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": "cf_prune"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | 原始工具输出 | |
| keepHead | No | 保留头部(默认 true) | |
| maxChars | No | 最大字符数,默认 2000;必须为 ≥ 1 的整数 | |
| maxLines | No | 最大行数,默认 200;必须为 ≥ 1 的整数 |