edit_file
Replace exact text in a file on a local or remote homelab host; the target text must occur once and client approval is required.
Instructions
Replace text in a file. WRITE action — your MCP client will ask for approval before running it. old_text must occur exactly once.
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>",
"old_text": "<old_text>",
"new_text": "<new_text>"
},
"name": "edit_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | No | Server name from HOMELAB_HOSTS (e.g. 'sil-baru'). Omit to run on the local machine. | |
| path | Yes | Absolute path inside HOMELAB_PROJECT_DIRS (e.g. '/home/user/projects/api') | |
| new_text | Yes | Replacement text | |
| old_text | Yes | Exact text to find (must occur exactly once) |