Write a whole file
fs_writeWrite text or hex data to a local file, create parent directories automatically, and verify the result by reading it back. Use hash checks to protect existing files from unintended overwrites.
Instructions
Provide exactly one of text or hex. A hex write to an existing file requires expect_hash unless force is set. The write is read back. Parent directories are created by default.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "fs_write"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hex | No | hex | |
| path | No | path | |
| text | No | text | |
| force | No | force | |
| encoding | No | encoding | |
| preserve | No | ||
| create_dirs | No | create_dirs | |
| expect_hash | No | expect_hash |