project_file_read
Read the raw source of a single deployed file. Returns the actual bytes that were uploaded — not DOM-rendered HTML, not a screenshot. Static files come back as UTF-8 text; binary files (images, fonts, etc.) come back base64-encoded; server functions return their source code.
project_files_list lists available paths; project_export returns the full project.
Example:
{ "project_id": "my-saas", "path": "styles.css" }
// Returns: { project_id, env: "prod", path: "styles.css", type: "static", content: "body { ... }", encoding: "utf-8" }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": {
"project_id": "<project_id>",
"path": "<path>"
},
"name": "project_file_read"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| env | No | Which environment to read from. Defaults to "prod" (live). Explicit "dev" requires hosted preview access for signed-in accounts on every plan. | |
| path | Yes | File path relative to the project root (e.g. "index.html", "api/checkout.mjs", "assets/hero.jpg"). | |
| version | No | Read this retained production version by number. Omit env or use env:prod. | |
| preview_id | No | Exact current candidate of preview_session_id. Both fields are required together. | |
| project_id | Yes | Project ID, slug, subdomain, or 'default'. | |
| preview_session_id | No | Exact open preview session paired with preview_id and env:"dev". It does not fall back to another source. |