insert_after_symbol
Add content after a specified symbol’s definition in code files within the Serena MCP Server. Use to insert new classes, functions, methods, or variable assignments efficiently. Specify symbol path, file location, and content to insert.
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.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
body | Yes | The body/content to be inserted. The inserted code shall begin with the next line after the symbol. | |
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. |