Create or replace a file
write_fileCreates or overwrites one file (folders are created as needed). Use encoding "base64" for binary files such as images. Up to 20 MB.
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": {
"site": "<site>",
"path": "<path>",
"content": "<content>"
},
"name": "write_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path relative to the website root (public_html), e.g. "index.html" or "css/style.css". Start with "~/" for the private account home folder. | |
| site | Yes | The website's domain, as shown by list_sites (e.g. "example.com" or "name.hostingfor.ai"). | |
| content | Yes | File contents (UTF-8 text, or base64 when encoding is "base64"). | |
| encoding | No | How content is encoded: "utf8" for text, "base64" for binary files such as images. | utf8 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | ||
| bytes | No | ||
| saved | Yes | ||
| warning | No |