Insert After Symbol
insert_after_symbolInsert new code after specific symbol definitions in files to add classes, functions, methods, or assignments without manual file editing.
Instructions
Inserts the given body/content after the end of the definition of the given symbol (via the symbol's location). A typical use case is to insert a new class, function, method, field or variable assignment.
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": {
"name_path": "<name_path>",
"relative_path": "<relative_path>",
"body": "<body>"
},
"name": "insert_after_symbol"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name_path | Yes | Name path of the symbol after which to insert content (definitions in the `find_symbol` tool apply). | |
| relative_path | Yes | The relative path to the file containing the symbol. | |
| body | Yes | The body/content to be inserted. The inserted code shall begin with the next line after the symbol. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |