Edit part of a file
edit_blockDestructive
Replace exact text inside an existing text file. Safer than rewriting the whole file: it fails, and changes nothing, if old_string is not found or appears a different number of times than expected_replacements (default 1).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| device | No | Device name. Optional when the account has only one online device. | |
| new_string | Yes | Text to put in its place. | |
| old_string | Yes | Exact text to find (including whitespace). Must not be empty. | |
| expected_replacements | No | How many times old_string should appear. Default 1. |