write_file
Writes content to a specified file path, automatically creating any missing parent directories to simplify file creation tasks.
Instructions
Write content to file. Creates parent dirs.
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 | File path. | |
| content | Yes | Content to write. | |
| encoding | No | Encoding: utf8|base64. Default: utf8. | |
| create_parents | No | Create parent dirs. Default: true. |