replace_symbol_body
Replace symbol bodies in code by specifying name path, relative path, and new body content to update function definitions and other symbol implementations.
Instructions
Replaces the body of the symbol with the given name_path.
The tool shall be used to replace symbol bodies that have been previously retrieved
(e.g. via find_symbol).
IMPORTANT: Do not use this tool if you do not know what exactly constitutes the body of the symbol.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name_path | Yes | For finding the symbol to replace, same logic as in the `find_symbol` tool. | |
| relative_path | Yes | The relative path to the file containing the symbol. | |
| body | Yes | The new symbol body. The symbol body is the definition of a symbol in the programming language, including e.g. the signature line for functions. IMPORTANT: The body does NOT include any preceding docstrings/comments or imports, in particular. |