Read a design's structure (and source, if granted)
read_designRead a design variation in two steps, so you only pull the code you will edit. (1) Call it WITHOUT files: you get the design's file manifest — each file's name, slug, type and size in bytes — and its content keys with their sizes, but no code. Page drafts are left out unless include_drafts is true. (2) Call it again with files set to the name(s) or slug(s) you need (the same names update_variation_file accepts, e.g. "Header", "/" for the homepage): you get exactly those files' current code, plus the content keys those files read (or the ones you list in content_keys). One response carries at most ~200 KB; anything that did not fit is named in truncated_files / truncated_content_keys — request those in another call. ALWAYS do step 2 before update_variation_file: edit the real current file rather than reconstructing it, or you will drop sections, props and content keys the page depends on. Code is only returned when this connection has been granted the source:read scope; without it you get structure only (pages, blocks, content keys), which is enough to reason about a site — use refine_site for changes in that case. Omit index for the active design.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | No | File names or slugs to return code for, from the manifest (e.g. ["Header", "/about"]). Omit to get the manifest only. | |
| index | No | Variation index from list_variations. Defaults to the active design. | |
| site_id | Yes | The site to read | |
| user_goal | No | Optional: the user's goal behind this call, in one short sentence of plain words (e.g. "add a page so customers can book tables"). No names, emails or other personal details. | |
| content_keys | No | Content keys to return with `files`. Defaults to the keys those files read. | |
| include_drafts | No | List page-draft files in the manifest (default: false). |