Patch SSH File
unfour.ssh.patch_fileApplies a search-and-replace patch to a remote file over SSH and returns a diff summary without file content; confirmation is required for test/system or multi-match changes, and prod is blocked.
Instructions
Applies a search/replace patch through SSH stdin using Python 3 (4 MiB combined UTF-8 search/replace; 16 MiB target and result limit) and returns a diff summary without file content. Dev allows single-match project-file patches; test, system paths, or multi-match replacements require confirmation; prod is blocked by policy.
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": {
"connectionId": "<connectionId>",
"path": "<path>",
"search": "<search>",
"replace": "<replace>"
},
"name": "unfour.ssh.patch_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| search | Yes | ||
| confirm | No | ||
| replace | Yes | ||
| timeoutMs | No | ||
| workspaceId | No | ||
| connectionId | Yes | ||
| confirmationText | No | ||
| confirmation_text | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| warnings | No |