swebsy_insert_block
Insert a pre-built block from the catalog, optionally customizing its content and position, so it re-themes to the current site and you avoid building from scratch.
Instructions
Insert a pre-built block from the catalog and optionally customize its content. STRONGLY preferred over generating from scratch when a matching block exists. The block re-themes on insert — its colour and font classes resolve against THIS site's theme, so the result is meant to differ from the catalog thumbnail (a screenshot of the block in the template it came from).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| blockId | Yes | The block ID from the catalog (e.g., 'clarity-content-with-image'). | |
| 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. | |
| targetPath | No | Zero-based component indexes from the current page root, exactly as returned by the most recent `read_page` call. The block lands as a sibling immediately before or after this component, per `position`. Ignored when `position` is 'start' or 'end'. | |
| adaptations | No | Structured customizations applied to the block before insertion. |