edit_file_advanced
Edit files with advanced options: choose encoding, create backups, and use overwrite, append, prepend, or insert modes for precise content modification.
Instructions
高级文件编辑功能(支持部分编辑、多编码、备份等)
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>",
"content": "<content>"
},
"name": "edit_file_advanced"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | 文件路径 | |
| content | Yes | 要写入的内容 | |
| encoding | No | 文件编码 | utf8 |
| backup | No | 是否创建备份文件 | |
| mode | No | 编辑模式 | overwrite |
| position | No | 插入位置(仅在insert模式下使用) |