Edit Preview
edit_previewPreview where an anchor string matches in a file before editing, returning match count, line numbers, and snippets to confirm uniqueness. Read-only and low-cost, it helps avoid failed edits.
Instructions
Show where old_string would match in a file, without editing it.
Returns the match count, 1-based line numbers, and short snippets so you
can confirm an anchor is unique before calling edit. Read-only and cheap
(kept under ~200 tokens), so use it freely as a probe. Raises an error on
a binary file or an empty old_string.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | File path to search (absolute, or relative to root). | |
| old_string | Yes | Anchor text to locate. Must match exactly, including whitespace and indentation. Cannot be empty. |