Edit file
edit_blockUse this when one known text block in one file should be replaced, with a whitespace-tolerant fallback and optional dry-run diff. Use write_file only when replacing the whole file, and replace_lines when the intended target is a known line range rather than matching text.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| device | Yes | ReMCP device id returned by list_devices. Required for every device operation. | |
| dry_run | No | Return the diff without changing the file. Default false. | |
| file_path | Yes | Absolute path of the file to edit. | |
| new_string | Yes | Replacement text. | |
| old_string | Yes | Exact existing text to replace. | |
| allow_fuzzy | No | Allow a whitespace-tolerant fallback when the exact text is not found. Default true. | |
| expected_replacements | No | Number of matches required for the edit to apply. Default 1. |
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. |