Compress a batch of messages
pack_batchPack several messages into ONE compressed packet instead of packing them one at a time. REQUIRES A KEY. Worth it for many small/medium messages (the per-message header cost is paid once per batch, and zstd shares context across them) — for a single message this has no advantage. Returns packet_b64 (hand it to unpack_batch to get the messages back) plus the measured byte savings versus packing each message separately. SECURITY: only batch messages that already share the SAME trust boundary (same tenant/agent — nothing attacker-influenced mixed in with a secret). Batched messages share one compression context, which can leak size-based information between them (a CRIME/BREACH-style side channel). There is no padding mitigation on this endpoint today, so trust-boundary separation is the only protection — don't rely on padding.
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": {
"texts": "<texts>"
},
"name": "pack_batch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| texts | Yes | The messages to batch together, in order. Two or more — a single message gets no benefit. | |
| dict_id | No | Which trained dictionary to compress against. Call list_packages to see the options. | finance |
| agent_id | No | Optional. A label for audit/metrics. |