Read page
swebsy_read_pageInspect the current page structure to get each component's target path and id before editing. Call it to locate sections or drill into nested elements, then re-read to verify edits.
Instructions
Read the current page structure: each line shows a component's target path and its #id. edit_section, delete_section, move_section, duplicate_section and link_page take either — prefer the id (targetId), which survives moves and inserts; other tools take the path. Use the id only to target; don't copy auto ids into markup. Call this BEFORE editing a named or relative page component that is not the current selection. The default sections read lists every top-level section with its target path — enough to pick the one to edit. To find a nested element (a link, button, card) pass that section's targetPath plus depth — one call instead of drilling down level by level. When copying content between components, use detail: full WITH the targetPath of the one section you're copying, not a whole-page read. Also call it AFTER applying edits to verify the result.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| depth | No | Optional. How many levels of the indexed tree to print below the section layer (default 1 = each section only, deeper nodes summarised as '(N descendants)'). Every printed line keeps its target path. Pair with `targetPath` to see a whole section in one call — e.g. `targetPath: [7], depth: 6` lists every link in the footer with its path for link_page/edit_section. Above 1 the read is capped at ~24 KB and ends with a '…(truncated: … next is [path])' marker if it doesn't fit; values above 12 are clamped. | |
| detail | No | 'sections' (default): every section at the read root with its target path, an ~80-char text preview, and its descendant count — bounded and complete (~1-2 KB). 'outline': a deeper type/tag/class tree, character-capped (~2 KB; prefer `sections` + `depth`). 'full': the complete cleaned JSON tree, for copying content between components (scope it with targetPath). | |
| targetPath | No | Optional. Zero-based component indexes from the page root (as returned by a prior read_page) that scope the read to that ONE subtree instead of the whole page. Strongly recommended with `detail: full` — reading one section's JSON instead of the entire page. |