Write File
fc_write_fileWrites content to a file, creates missing files and directories, and can append instead of overwriting. Use it to save or update file data with explicit overwrite behavior.
Instructions
Writes content to a file. Creates the file if it does not exist.
Args:
path (string): Full path to the file
content (string): Content to write
append (boolean, optional): Append to file instead of overwriting
create_dirs (boolean, optional): Create missing directories
Returns:
Confirmation with file size
Warning: Overwrites existing files without warning when append=false!
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": "fc_write_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Full path to the file | |
| append | No | Append to file | |
| content | Yes | Content to write | |
| create_dirs | No | Create missing directories |