swebsy_add_section
Insert a new section (hero, features, pricing, CTA) into the current page, appending at the end by default or placing it before/after a selected component.
Instructions
Insert a new section into the current page. Use for adding discrete sections (hero, features, pricing, CTA) to an existing page. Appends to the end by default; to place it somewhere specific, pass position plus the targetPath of the component to place it next to.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| summary | Yes | 1 sentence describing what this section does. | |
| position | No | Where to insert. Defaults to 'end' if omitted. 'before-selected'/'after-selected' are measured against `targetPath` when you pass one, otherwise against the canvas selection — so pass `targetPath` with them unless the user has selected something. | |
| component | Yes | The section component to insert. | |
| targetPath | No | Zero-based component indexes from the current page root, exactly as returned by the most recent `read_page` call. The new section lands as a sibling immediately before or after this component, per `position`. Ignored when `position` is 'start' or 'end'. |