create_text_file
Create or overwrite text files with complete content using specified paths on the Serena MCP Server. Use for full-file updates; partial edits are supported by other tools like replace_lines or symbolic operations.
Instructions
Write a new file (or overwrite an existing file). For existing files, it is strongly recommended to use symbolic operations like replace_symbol_body or insert_after_symbol/insert_before_symbol, if possible. You can also use insert_at_line to insert content at a specific line for existing files if the symbolic operations are not the right choice for what you want to do.
If ever used on an existing file, the content has to be the complete content of that file (so it may never end with something like "The remaining content of the file is left unchanged."). For operations that just replace a part of a file, use the replace_lines or the symbolic editing tools instead. Returns a message indicating success or failure.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
content | Yes | The (utf-8-encoded) content to write to the file. | |
relative_path | Yes | The relative path to the file to create. |