insert_symbol
Insert text on a new line before or after a named declaration. Preview by default; apply writes changes to disk.
Instructions
Insert text next to a named declaration — position=after (default) or before. The outline gives the point (no Read). PREVIEW by default; apply=true writes. Use instead of Read-then-Edit to add a declaration.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | Declaration to insert next to. | |
| text | Yes | Text to insert (on its own line). | |
| position | No | `after` (default) or `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 | Project root (cwd). | |
| backend | No | Backend override; auto-detected. | |
| maxResults | No | Result cap (60). |