Write File
write_fileWrite base64-encoded content to a file, overwriting existing data and creating parent directories by default. Returns the written size and SHA-256 hash for verification.
Instructions
Write base64 content to a file, overwriting; creates parent dirs by default. Returns size and sha256 of the written bytes.
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_b64": "<content_b64>"
},
"name": "write_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | POSIX permission bits for the new file, 0..0o7777 (default 0o644; ignored on Windows). | |
| path | Yes | File path; "~" expands to home. | |
| mkdirs | No | Create missing parent directories (default true). | |
| content_b64 | Yes | Standard base64 file content. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| path | No | ||
| size | No | ||
| error | No | ||
| sha256 | No |