site_file_put
Write a single file into a site's web root via SSH, setting ownership to the site's user. Ideal for small one-off files like index.html or .htaccess.
Instructions
Write a single small file into a site's web root from inline content, over SSH, then chown it to the site's system user. For quick one-off files (index.html placeholder, .htaccess, robots.txt) — the content travels through the model, so keep it small; use site_files_upload/site_files_deploy for real payloads. rel_path is the file path relative to the web root; parent directories are created as needed. WRITE — dry_run:true to preview, confirm:true to execute. Requires SSH (FASTPANEL_SSH_HOST).
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_id": "<site_id>",
"rel_path": "<rel_path>",
"content": "<content>"
},
"name": "site_file_put"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| confirm | No | ||
| content | Yes | File contents (max 256KB). Use encoding:'base64' for binary. | |
| dry_run | No | ||
| site_id | Yes | Site id from sites_list | |
| encoding | No | How `content` is encoded. base64 for binary files. | utf8 |
| rel_path | Yes | File path relative to the web root, e.g. 'index.html' or 'assets/robots.txt' |