Edit File
edit-fileReplace an exact string in a remote FTP text file without re-uploading the entire content; use replaceAll for multiple matches.
Instructions
Edit a text file on the FTP server by replacing an exact string, without re-uploading the whole file content. oldText must match exactly (including whitespace) and be unique in the file unless replaceAll is set.
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": {
"remotePath": "<remotePath>",
"oldText": "<oldText>",
"newText": "<newText>"
},
"name": "edit-file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| newText | Yes | Text to replace it with | |
| oldText | Yes | Exact text to find in the file | |
| remotePath | Yes | Path of the file on the FTP server | |
| replaceAll | No | Replace every occurrence instead of requiring oldText to be unique (default: false) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fileSize | Yes | ||
| remotePath | Yes | ||
| replacements | Yes |