Skip to main content
Glama

Serena

by oraios

create_text_file

Generate or overwrite text files with specified content using symbolic operations for precision. Ideal for managing file creation and editing in large code bases.

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

NameRequiredDescriptionDefault
contentYesThe (utf-8-encoded) content to write to the file.
relative_pathYesThe relative path to the file to create.

Input Schema (JSON Schema)

{ "properties": { "content": { "description": "The (utf-8-encoded) content to write to the file.", "title": "Content", "type": "string" }, "relative_path": { "description": "The relative path to the file to create.", "title": "Relative Path", "type": "string" } }, "required": [ "relative_path", "content" ], "title": "applyArguments", "type": "object" }

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/oraios/serena'

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