project_export
Pull the entire project in one call. Returns every deployed file — static HTML/CSS/JS as text, binary assets (images, fonts, favicons, .ico/.png/.woff*/etc) base64-encoded, server functions as source — keyed by path. This is the visual-editor fast path: one call → entire project → edit → project_deploy back.
For workflows like "redesign my homepage" or "swap the color scheme on the live site," this is the entry point. Pairs with project_deploy (full replacement) and project_patch (single-file update) on the write side.
Response shape: flat files: [{ path, type, content, encoding }] array with explicit per-entry type ("static" / "binary" / "function"), plus the same files as static_files / binary_files / functions maps. SVG is utf-8 text (it's XML); PNG / ICO / fonts / etc come back base64.
static_only: true returns only the visual layer (HTML / CSS / SVG / images / fonts) and not the server functions. Typical projects have 5–10× more function bytes than static bytes, so this is the right default for design / redesign / "swap the color scheme" workflows. The functions map comes back empty; static_files and binary_files are unchanged.
For one file (e.g. just CSS), project_file_read is lighter; for the tree alone (paths + sizes, no contents), project_files_list is much cheaper.
Example:
{ "project_id": "my-saas", "static_only": true }
// Returns: {
// project_id: "my-saas-uuid", env: "prod", version: 47,
// files: [
// { path: "index.html", type: "static", content: "<!DOCTYPE...", encoding: "utf-8" },
// { path: "logo.svg", type: "static", content: "<svg...", encoding: "utf-8" },
// { path: "hero.jpg", type: "binary", content: "<base64>", encoding: "base64" }
// ],
// static_files: { ... }, binary_files: { ... }, functions: {}, // the same files as maps; functions empty when static_only
// counts: { static_files: 8, binary_files: 2, functions: 0, total: 10 }
// }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>"
},
"name": "project_export"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| env | No | Which environment to pull from. Defaults to "prod" (the live deployed source). Explicit "dev" requires hosted preview access for signed-in accounts on every plan. | |
| preview_id | No | Exact current candidate of preview_session_id. Both fields are required together. | |
| project_id | Yes | Project ID, slug, subdomain, or 'default'. | |
| static_only | No | When true, skip server functions and return only static files (HTML/CSS/SVG/images/fonts). Right default for design / redesign workflows. Defaults to false. | |
| preview_session_id | No | Exact open preview session paired with preview_id and env:"dev". It does not fall back to another source. |