ashlr

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

FieldTypeRequiredDescription
pathstringyesAbsolute or repo-relative file path
searchstringyesExact string to find (must be unique in the file)
replacestringyesReplacement string
strictbooleannoFail 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:

[ashlr__edit] servers/pricing.ts  ·  1 of 1 hunks applied

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:

[ashlr__edit] servers/cache.ts  ·  2 of 2 hunks applied
  - removed (19 tok):  console.log("ashlr: cache miss for key while resolving the genome manife…
  + added   (18 tok):  logger.debug("genome manifest cache miss", { key, source: "resolver" })

Example

Use ashlr__edit to change the SNIP_THRESHOLD from 2048 to 4096 in servers/efficiency-server.ts

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).

On this page