Replace Symbol Body
replace_symbol_bodyUpdate symbol definitions in code by replacing their bodies with new content, using name paths and relative file paths to locate symbols.
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
| 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. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |