Read Site File
read_site_fileRead the content of a single file on a site. Use mode: 'inline' to get the file content directly (text as UTF-8, binary as base64). Use mode: 'link' to get a short-lived authenticated download URL instead — useful for large files or when passing the URL to another tool. Use mode: 'auto' (default) to inline files under 100 KB and return a link for larger ones. Inline reads are capped at 1 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_id": "<site_id>",
"path": "<path>"
},
"name": "read_site_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | inline: return file content directly (UTF-8 or base64; files over 1 MB are refused). link: return a presigned download URL valid for 1 hour. auto: inline if the file is ≤ 100 KB, otherwise return a link. Default is 'auto'. | auto |
| path | Yes | File path relative to site root, e.g. 'index.html' or 'assets/logo.png'. | |
| site_id | Yes | The site's public identifier returned by list_sites or create_site. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| content | No | ||
| encoding | No | ||
| expires_at | No | ||
| size_bytes | Yes | ||
| content_type | Yes | ||
| download_url | No |