write_file
Create UTF-8 files or replace existing ones with explicit overwrite permission, while capturing snapshots for change tracking.
Instructions
Create a UTF-8 file. Overwriting an existing file requires overwrite=true. Changes get snapshots.
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": {
"file": "<file>",
"content": "<content>"
},
"name": "write_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Relative file path | |
| content | Yes | UTF-8 file content | |
| overwrite | No | Permit replacement of existing file | |
| expectedSha256 | No | Optional expected SHA-256 (empty if not existing) |