Write file on webspace
webspace_write_fileCreate or overwrite a file inside a webspace as its site user, jailed to the home directory. An existing file is replaced completely, so read it with webspace_read_file first when changing only part of it. Missing parent directories are created. Max 32 MB. Files under public_html are live on the website at once. For a VPS use vps_write_file.
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": {
"id": "<id>",
"path": "<path>",
"content": "<content>"
},
"name": "webspace_write_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The webspace ID | |
| path | Yes | Path relative to the webspace's home directory, or absolute under /home/<user>/. The web root is public_html. | |
| content | Yes | The whole file content: plain text for utf8, base64 for binary files | |
| encoding | No | utf8 (default) for text, base64 for binary content |