Write a file to the local filesystem.
WriteCreate or fully rewrite files in legacy encodings like GBK or Big5, preserving the original encoding. Requires reading existing files first to avoid overwriting unintentionally.
Instructions
Writes a file to the local filesystem.
Usage:
This tool will overwrite the existing file if there is one at the provided path.
If this is an existing file, you MUST use the Read tool first to read the file's contents. This tool will fail if you did not read the file first.
Prefer the Edit tool for modifying existing files — it only sends the diff. Only use this tool to create new files or for complete rewrites.
NEVER create documentation files (*.md) or README files unless explicitly requested by the User.
Only use emojis if the user explicitly requests it. Avoid writing emojis to files unless asked.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | The content to write to the file | |
| file_path | Yes | The absolute path to the file to write (must be absolute, not relative) |