write_file
Write UTF-8 text files inside the workspace root, requiring explicit overwrite for existing files. Use expected_sha256 to avoid overwriting updated files.
Instructions
Write a UTF-8 text file below the configured workspace root. Existing files require overwrite=true; expected_sha256 can prevent lost updates.
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 | Workspace-relative file path; parent directory must already exist | |
| content | Yes | Complete UTF-8 file contents | |
| overwrite | No | ||
| expected_sha256 | No | Optional SHA-256 of the existing file returned by read_file |