toon_optimize_prompt
Optimize prompts by converting data structures to TOON format for token efficiency, reducing LLM usage and costs while maintaining data integrity.
Instructions
Optimize a prompt containing data for token efficiency.
Detects data structures within the prompt and converts them to TOON format, adding instructions for the LLM to understand the format.
Returns the optimized prompt with estimated token savings.
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": "toon_optimize_prompt"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | The full prompt containing data to optimize |