write_file
Write content to a file with support for UTF-8 or base64 encoding, overwrite or append mode, and automatic creation of parent directories.
Instructions
Write content to a file. Supports UTF-8 or base64 encoding. Can overwrite or append. Creates parent directories if needed.
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 | |
| content | Yes | Content to write to the file | |
| encoding | No | Encoding of the content: utf8 (default) or base64 | utf8 |
| mode | No | Write mode: overwrite or append | overwrite |