file_write
Create or overwrite a text file in a project, returning a snapshot ID for undo.
Instructions
Create or overwrite a file at a project-relative path. Returns a snapshot id for undo.
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": "file_write"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Project-relative path of the file to write | |
| content | Yes | Full file content (UTF-8 text) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| error | Yes | ||
| _hints | Yes | ||
| requiresHarnessSession | Yes |