write_file
Write a file in a WSL distribution with automatic parent directory creation, text or base64 encoding, and optional SHA-256 hash for data verification.
Instructions
Write a file in WSL. content is UTF-8 text by default; set encoding="base64" for binary content. Creates parent directories as needed. sha256=true returns a hash of the written bytes for round-trip verification.
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 | ||
| distro | No | ||
| sha256 | No | Return sha256 (hex) of the written bytes | |
| content | Yes | ||
| encoding | No | Default "text" |