sage_write_file
Create or update a file. Returns bytes/lines/sha256 confirmation instead of echoing the content back — saves the whole file's tokens. Existing files require overwrite=true (a snapshot is taken first so it is reversible).
Instructions
Create or update a file. Returns bytes/lines/sha256 confirmation instead of echoing the content back — saves the whole file's tokens. Existing files require overwrite=true (a snapshot is taken first so it is reversible).
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": "sage_write_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | File path to write | |
| append | No | Append instead of replace | |
| content | Yes | Full file content | |
| overwrite | No | Allow replacing an existing file |