edit_preview
Check where an anchor text matches in a file to confirm uniqueness before editing. Returns match count, line numbers, and snippets without modifying the file.
Instructions
Preview where old_string matches in a file without modifying it.
Returns match count, 1-based line numbers, and small snippets so the
caller can confirm an anchor is unique before committing to edit.
Read-only and intentionally cheap — under ~200 tokens — so it can be
called freely as a probe.
Args: path: File path to search. old_string: Anchor text. Must match exactly (whitespace, indentation).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| old_string | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| truncated | No | ||
| path | No | ||
| found | No | ||
| match_count | No | ||
| line_numbers | No | ||
| context | No |