token_squeezer
Compresses Python source files by 50-70% using AST analysis to extract structural interfaces and docstrings, cutting context size for LLM prompts while preserving key signatures.
Instructions
AST-based context compressor. Shrinks Python source files by 50-70% by extracting structural interfaces and docstrings.
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": {
"file_path": "<file_path>"
},
"name": "token_squeezer"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | interface | |
| file_path | Yes | Path to Python file to compress |