Read a file from a deployed site
read_fileReturn the bytes of one file currently served by the site. Use this to inspect or edit existing content (call read_file → modify → update_site mode:'patch') so a new chat can iterate on a site without re-uploading. Files larger than 5242880 bytes can't be read in one call. Use list of paths from get_site.filePaths to discover what's available.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Site name (subdomain) or custom domain. Same lookup rules as get_site. | |
| path | Yes | Site-relative path of the file to read (e.g. 'index.html', 'assets/main.css'). No leading slash, no '..'. | |
| siteId | No | Alternative to name. One of name|siteId is required. | |
| maxBytes | No | Per-file size cap. Default 1048576, hard max 5242880. If the file is larger, the call fails with FILE_TOO_LARGE rather than returning truncated bytes — splitting source mid-token would corrupt downstream edits. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| path | Yes | Echoes the input path, normalized (leading slash stripped, backslashes converted). | |
| size | Yes | Size in bytes of the file on the pod. | |
| siteId | Yes | ||
| content | Yes | ||
| encoding | Yes | How to interpret `content`. utf8 means the file is text and `content` is the raw text. base64 means the file is binary (image/font/etc.) and `content` is base64 — decode before use. | |
| request_id | No | Server-assigned request correlation id. Quote it when contacting support. |