insert_before_symbol
Insert text on a line before a named declaration, such as adding an import or decorator. Preview by default; set apply=true to write changes.
Instructions
Insert text on a line BEFORE a named declaration (e.g. add an import/attribute/decorator above it). The outline supplies the insertion point. Default PREVIEW; apply=true writes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | Declaration to insert before. | |
| text | Yes | Text inserted on a line before the declaration. | |
| path | No | File holding the symbol (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 |