replace_symbol_body
Replace a declaration body by naming it, using language-server outline for precise span. Preview by default; apply writes.
Instructions
Replace a whole declaration (function/method/class body, signature included) by NAMING it — the language-server outline supplies the exact span, so you don't Read the file into context or count lines for an exact-match Edit. Default PREVIEW returns the affected file:line; apply=true writes. Token-cheap symbol-level editing instead of read-whole-file-then-Edit.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | Declaration name to replace (e.g. a function/class name). | |
| body | Yes | New full text for the declaration (signature + body). | |
| path | No | File holding the symbol (pins the outline; else resolved via the index). | |
| line | No | 0-based line to disambiguate same-named symbols (optional). | |
| apply | No | Write to disk (default false = preview only). | |
| projectPath | No | ||
| backend | No | ||
| maxResults | No |