write_file
Create or overwrite file content with configurable encoding, append support, and automatic parent directory creation.
Instructions
Write content to file with optional encoding and directory creation
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>",
"content": "<content>"
},
"name": "write_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to the file to write | |
| append | No | Append to file instead of overwriting | |
| content | Yes | Content to write to the file | |
| encoding | No | File encoding | utf8 |
| createDirs | No | Create parent directories if they don't exist |