Write file
write_fileCreate or overwrite a file with given content. Requires the current rev when overwriting an existing file in revision-policy zones; use edit_file for in-file changes.
Instructions
Create or overwrite a file with given content. In a zone with policy overwrite="rev", overwriting an EXISTING file requires its current rev (creating a new one does not); the refusal message carries the rev to use. For a change inside a file use edit_file. Document formats (PDF, DOCX…) are not overwritten.
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 |
|---|---|---|---|
| rev | No | Current rev of the file being overwritten. From grep_files, read_text_file offset, or get_file_info. | |
| path | Yes | ||
| content | Yes |