file_patch
Apply incremental edits to a file by searching for a specific string and replacing it with new text. Supports remote file patching.
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": {
"filepath": "<filepath>",
"search": "<search>",
"replace": "<replace>"
},
"name": "file_patch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| search | Yes | 要搜索的原始文本 | |
| replace | Yes | 要替换成的新文本 | |
| filepath | Yes |