write_file
Write content to a file with configurable encoding and overwrite behavior. Accepts file path and content, with optional encoding and overwrite settings for precise control.
Instructions
Write content to a file.
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 | File encoding (default: utf-8) | utf-8 |
| overwrite | No | Whether to overwrite if file exists (default: True) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |