Replace lines
replace_linesUse this when the intended edit target is a specific 1-based line range in one file, optionally as a dry run. Use edit_block for matching an exact text block and write_file for replacing the complete file.
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>",
"start_line": "<start_line>",
"end_line": "<end_line>",
"content": "<content>",
"device": "<device>"
},
"name": "replace_lines"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path of the file to edit. | |
| device | Yes | ReMCP device id returned by list_devices. Required for every device operation. | |
| content | Yes | Replacement text; an empty string deletes the range. | |
| dry_run | No | Return the diff without changing the file. Default false. | |
| end_line | Yes | Last line to replace, 1-based and inclusive. | |
| start_line | Yes | First line to replace, 1-based and inclusive. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | Optional structured result data for follow-up reasoning and tool calls. | |
| text | Yes | Concise human-readable result of the tool call. |