smart_process
Detects minified code, beautifies it for editing, applies changes, then re-minifies. Edit minified JavaScript and CSS without losing formatting.
Instructions
Smart workflow: auto-detect if minified, beautify if needed, process, and optionally re-minify. Perfect for editing minified files.
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": {
"code": "<code>",
"file_type": "<file_type>"
},
"name": "smart_process"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Code to process | |
| action | No | Action to perform: 'read' returns beautified code, 'edit' applies modifications, 'write' returns minified result | read |
| file_type | Yes | Type of code (js or css) | |
| indent_size | No | Number of spaces for indentation when beautifying | |
| modifications | No | JSON string describing modifications to apply (for 'edit' action). Format: [{"find": "text", "replace": "new_text"}] |