Write file
write_fileCreate or overwrite UTF-8 files atomically via temp file and rename to prevent partial writes; optionally enforce SHA-256 checks and preview changes with dry-run.
Instructions
Write a UTF-8 text file on this computer ATOMICALLY (temp file + rename, so a dropped connection never leaves a half-written file). Creates or overwrites the file. Pass expectedSha256 (from read_file) to refuse the write if the file changed meanwhile — this prevents silently overwriting work done by another agent in parallel. The previous version is kept in ZeroIDE history (not next to the file), so the owner can undo the change in Settings → Changes; backup=false skips that. Use dryRun=true to preview a diff without writing.
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 |
|---|---|---|---|
| note | No | Short human-readable explanation (1 line, in the user's language) of what you are about to do and why. Shown to the user on the approval card. Always provide when calling mutating tools. | |
| path | Yes | ||
| agent | No | Short consistent identifier or display name of this agent (e.g. 'Claude · Лендинг', 'Тесты', 'Мой агент'). Used to separate tasks and route tray messages when multiple agents work in parallel. | |
| backup | No | ||
| dryRun | No | ||
| content | Yes | ||
| requestId | No | ||
| expectedSha256 | No |