Edit File
fs_edit_fileEdits existing text files by replacing an exact string with new content, optionally updating all matching occurrences.
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>",
"target": "<target>",
"replacement": "<replacement>"
},
"name": "fs_edit_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | 目标文件路径 | |
| target | Yes | 需要被替换的原文片段 | |
| replaceAll | No | 是否替换全部匹配项 | |
| replacement | Yes | 替换后的新内容 |