read_edit
Read a file and optionally edit it in a single call, reducing tool calls for single-file tasks. Omit edit parameters for read-only.
Instructions
Read a file and optionally edit it in one call. For single-file tasks, use this instead of separate read_file + edit calls. Returns file content. Edit params (old_string, new_string) are optional — omit them for read-only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Absolute path to the file | |
| old_string | No | Text to replace (exact match or regex if use_regex=true) | |
| new_string | No | Text to replace with | |
| use_regex | No | Treat old_string as regex (default: false) | |
| replace_all | No | Replace all occurrences (default: false) | |
| offset | No | Line number to start reading from (optional) | |
| limit | No | Number of lines to read (optional) |