ashlr__edit
Diff-format edit. Sends only old_string + new_string, never the full file contents.
Server: ashlr-efficiency — servers/efficiency-server.ts
Replaces Claude Code's built-in Edit tool. The key difference: only the search string and replacement string are transmitted — the server reads the file locally, applies the edit, and confirms. This avoids sending the full file body back and forth.
Input schema
| Field | Type | Required | Description |
|---|---|---|---|
path | string | yes | Absolute or repo-relative file path |
search | string | yes | Exact string to find (must be unique in the file) |
replace | string | yes | Replacement string |
strict | boolean | no | Fail if search matches more than once (default: true) |
Output format
An exact, unique match (the default strict case) and tiny edits (under 120 characters of search plus replace) return only the header line, because the caller already knows what it sent:
Replace-all edits (strict: false) and fuzzy matches add the first line of the removed and added text, each truncated at 72 characters, with a token estimate:
Example
Savings baseline
Typical savings: −60 to −90 % vs a Read + full-file Write round-trip. Savings scale with file size — a 10 KB file with a 20-character change sends ~40 characters instead of 10,000.
Strict mode
By default, strict: true — if search matches more than once, the edit is rejected and an error is returned. Set strict: false to apply the replacement to all occurrences (equivalent to replace_all).
Related tools
ashlr__multi_edit— batch edits across multiple files atomicallyashlr__read— read first to find the exact string to search for