ssh-edit-block
Edit specific text blocks in remote files by finding and replacing text, minimizing data transfer compared to full file rewrites.
Instructions
Edit specific text blocks in remote files (token-efficient alternative to full rewrites)
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": {
"host": "<host>",
"user": "<user>",
"filePath": "<filePath>",
"oldText": "<oldText>",
"newText": "<newText>"
},
"name": "ssh-edit-block"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | Yes | Remote server hostname or IP address | |
| user | Yes | SSH username | |
| filePath | Yes | Path to file on remote server | |
| oldText | Yes | Text to find and replace | |
| newText | Yes | Replacement text | |
| expectedReplacements | No | Expected number of replacements (default: 1) | |
| privateKeyPath | No | Path to SSH private key (optional) | |
| port | No | SSH port (default: 22) |