fs_write_file
Write content to files with automatic directory creation and file overwriting capabilities for development workflows.
Instructions
Write content to a file. Creates the file if it doesn't exist, overwrites if it does. Can create parent directories.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute or relative path to the file to write | |
| content | Yes | Content to write to the file | |
| encoding | No | File encoding | utf8 |
| createDirs | No | Create parent directories if they don't exist |
Input Schema (JSON Schema)
{
"properties": {
"content": {
"description": "Content to write to the file",
"type": "string"
},
"createDirs": {
"default": true,
"description": "Create parent directories if they don't exist",
"type": "boolean"
},
"encoding": {
"default": "utf8",
"description": "File encoding",
"enum": [
"utf8",
"binary",
"base64"
],
"type": "string"
},
"path": {
"description": "Absolute or relative path to the file to write",
"type": "string"
}
},
"required": [
"path",
"content"
],
"type": "object"
}