cleanup_file
Remove BOM, trailing whitespace, and NUL bytes from files. Normalize line endings and ensure final newline, with configurable options.
Instructions
Remove BOM, trailing whitespace, fix line endings, remove NUL bytes. Configurable per-option.
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": {
"path": "<path>"
},
"name": "cleanup_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to the file | |
| dry_run | No | ||
| remove_bom | No | ||
| remove_nul_bytes | No | ||
| ensure_final_newline | No | ||
| normalize_line_endings | No | lf | |
| remove_trailing_whitespace | No |