whim_compact
Keep conversation history within a token budget by retaining the first and last messages and truncating the middle. Reduces token usage while preserving key context without summarization.
Instructions
Truncate conversation history to fit a token budget. Keeps first and last messages intact, truncates the middle. This is truncation, not summarization.
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": {
"messages": "<messages>"
},
"name": "whim_compact"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| messages | Yes | Messages to truncate | |
| maxTokens | No | Target token budget for the output (default: 4096) |