insert_symbol
Insert text next to a named declaration, choosing before or after position, with preview by default for safe editing.
Instructions
Insert text next to a named declaration — position=after (default)|before. The outline gives the point (no Read). PREVIEW by default; apply=true writes. Use instead of Read-then-Edit to add a declaration.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"symbol": "<symbol>",
"text": "<text>"
},
"name": "insert_symbol"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| line | No | 0-based line; disambiguate same-named (optional). | |
| path | No | File holding the symbol (else resolved via the index). | |
| text | Yes | Text to insert (own line). | |
| apply | No | Write to disk (default false = preview). | |
| symbol | Yes | Declaration to insert next to. | |
| backend | No | ||
| position | No | `after` (default) | `before`. | |
| maxResults | No | ||
| projectPath | No |