optimize_prompt
Shorten verbose prompts while preserving original intent, reducing token usage by 30-65% through selectable optimization levels.
Instructions
Shorten a verbose or redundant prompt/system prompt while preserving intent. Typical savings: 30–65%. Run once on system prompts that accumulate over iterations.
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": "optimize_prompt"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | The prompt text to optimize. | |
| optimization_level | No | "light" removes obvious filler, "medium" restructures, "aggressive" rewrites minimally. | medium |
| preserve_constraints | No | Never remove sentences with "never/must/always/do not". | |
| output_format | No | "prose" for flowing text, "bullets" for a bulleted list. | prose |
| model | No | Used for token counting. | gpt-4o |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||