Skip to main content
Glama

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
NameRequiredDescriptionDefault
name_pathYesFor finding the symbol to replace, same logic as in the `find_symbol` tool.
relative_pathYesThe relative path to the file containing the symbol.
bodyYesThe 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.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/chrisgreenx-ctrl/serena'

If you have feedback or need assistance with the MCP directory API, please join our Discord server