Write file
code_writeCreate a file or replace it whole. Returns the change and the tree's problems after it. To change part of a file, use code_edit.
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>",
"org": "<org>"
},
"name": "code_write"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| org | Yes | slug of the organization whose trees and sites to use. Required on every call, even when only one organization is listed; a path never names it. | |
| path | Yes | The file's address, <tree>:<path>. | |
| content | Yes | The whole text of the file. | |
| message | No | A brief note on the change. | |
| ifRevision | No | The revisionId returned by code_read; refuse unless the file is still at it. |