replace_symbol_body
Replace the body of a named symbol (function, class, method) in one call, using preview mode by default to verify changes before writing to disk.
Instructions
Change a whole function/class/method by NAMING it — USE INSTEAD OF Read-the-file + Edit (the outline gives the span, so you skip the whole-file Read and exact-match line-counting). PREVIEW by default; apply=true writes in ONE call.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | New full text (signature + body). | |
| line | No | 0-based line; disambiguate same-named (optional). | |
| path | No | File holding the symbol (else resolved via the index). | |
| apply | No | Write to disk (default false = preview). | |
| symbol | Yes | Declaration name to replace. | |
| backend | No | ||
| maxResults | No | ||
| projectPath | No |