Write / Update a File on Litewrite
litewrite_write_fileReplace the entire content of an existing file in a Litewrite project by providing the project ID, file path, and new text content. Use for updating files, not creating new ones.
Instructions
Replace the full content of an existing file on the Litewrite server (POST /api/internal/files/edit).
For creating a brand-new file use litewrite_create_file; for binary files use litewrite_upload_file.
Args:
projectId (string, required): The project id.
filePath (string, required): Path relative to the project root.
content (string, required): The new full text content.
Returns a confirmation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | The complete new file content | |
| filePath | Yes | Path relative to the project root | |
| projectId | Yes | The Litewrite project id |