compress_prompt
Reduce token usage by compressing prompts with adjustable strategies. Returns compressed text and savings statistics.
Instructions
Compress a prompt to reduce token usage. strategy: 'trim' (whitespace/blanks), 'summarize_hint' (mark long sections), 'aggressive' (strip comments, examples, filler). Returns compressed text + savings stats.
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": {
"prompt": "<prompt>"
},
"name": "compress_prompt"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | gpt-4o | |
| prompt | Yes | ||
| strategy | No | trim | |
| target_tokens | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||