> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tagada.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Tools Reference

> Complete reference for all Studio MCP tools

# Tools Reference

All tools operate on the **live Studio editor** in real-time via WebSocket. Changes appear on the canvas instantly.

The server exposes **54 tools** in 11 groups. Node kinds available: **72** (see `list_node_kinds`).

<Note>
  No `pageId` parameter is needed for most tools — they operate on the **currently active page** in Studio. Multi-page tools like `list_pages` and `read_page` let you inspect other pages.
</Note>

***

## Template Tools

Read the template structure and browse pages.

### `read_template`

Read the currently loaded template from the live Studio editor. Returns the template name, category, and a summary of all pages.

*No parameters.*

### `list_pages`

List all pages in the currently loaded template.

*No parameters.*

### `read_page`

Read a specific page's full document tree including root node, tokens, and assets. Shipped templates carry 1000+ copy tokens: pass includeTokens=false to get the tree alone (tokenCount is still reported) and use list\_tokens for the ones you need.

| Parameter       | Type    | Required | Description                             |
| --------------- | ------- | -------- | --------------------------------------- |
| `pageId`        | string  | Yes      | The page ID to read.                    |
| `includeTokens` | boolean | No       | Include document.tokens (default true). |

***

## Node Tools

Read, create, update, move, and delete nodes on the live canvas. Every mutation is **undo-able** in Studio (Ctrl+Z).

### `find_nodes`

Search for nodes in the current page by kind, prop name/value, or text content. Text search covers raw props and the resolved values of bound copy tokens (xxxToken props), so tokenized headings and labels are found; matches carry a `resolved` map of that text.

| Parameter   | Type   | Required | Description                                                                      |
| ----------- | ------ | -------- | -------------------------------------------------------------------------------- |
| `kind`      | string | No       | Filter by node kind (e.g., "Heading", "Button", "Layout.Stack").                 |
| `propName`  | string | No       | Filter by prop name existing on the node.                                        |
| `propValue` | string | No       | Filter by prop value (string match). Requires propName.                          |
| `text`      | string | No       | Case-insensitive search in string props and in the text their tokens resolve to. |

### `read_node`

Read a single node's full props, slots, and parent info from the live editor.

| Parameter | Type   | Required | Description      |
| --------- | ------ | -------- | ---------------- |
| `nodeId`  | string | Yes      | Node ID to read. |

### `update_node`

Update one or more props on a node. The change is applied live on the Studio canvas. Pass breakpoint="mobile" or "tablet" to write a per-viewport override instead of the base (desktop) value: the props are deep-merged into props.responsive\[breakpoint], keeping the other breakpoint's overrides. Only layout/typography props the renderer applies per breakpoint are accepted there (describe\_node\_kind marks them "responsive").

| Parameter    | Type                 | Required | Description                                                                 |
| ------------ | -------------------- | -------- | --------------------------------------------------------------------------- |
| `nodeId`     | string               | Yes      | Node ID to update.                                                          |
| `props`      | object               | Yes      | Props to update (merged with existing).                                     |
| `breakpoint` | `tablet` \| `mobile` | No       | Write the props as an override for this viewport instead of the base props. |

### `update_nodes_batch`

Update the same props on multiple nodes at once in a single undo step. Efficient for bulk styling: e.g. set the same border/radius on all cards. With breakpoint="mobile" or "tablet" the props become per-viewport overrides on every node (see update\_node).

| Parameter    | Type                 | Required | Description                                                                 |
| ------------ | -------------------- | -------- | --------------------------------------------------------------------------- |
| `nodeIds`    | string\[]            | Yes      | Node IDs to update.                                                         |
| `props`      | object               | Yes      | Props to apply to all nodes (merged with existing).                         |
| `breakpoint` | `tablet` \| `mobile` | No       | Write the props as an override for this viewport instead of the base props. |

### `add_node`

Add a new node as a child of a parent node's slot. The canvas updates live.

| Parameter  | Type   | Required | Description                                      |
| ---------- | ------ | -------- | ------------------------------------------------ |
| `parentId` | string | Yes      | Parent node ID.                                  |
| `slotName` | string | Yes      | Slot name on the parent (e.g., "children").      |
| `kind`     | string | Yes      | Node kind to create (e.g., "Heading", "Button"). |
| `props`    | object | No       | Optional props for the new node.                 |
| `position` | number | No       | Insert position (0-based). Appends if omitted.   |

### `apply_block`

Insert a full tree of nodes at once (multiple nodes with nested children). All nodes are added in a single undo step. Use this to insert complex layouts like a card with heading + text + button, or an entire section with multiple children. Each node in the array needs: \{ id, kind, props, slots? }. Slots are: \{ \[slotName]: \{ items: \[childNodes] } }.

| Parameter  | Type      | Required | Description                                                                                                       |
| ---------- | --------- | -------- | ----------------------------------------------------------------------------------------------------------------- |
| `parentId` | string    | Yes      | Parent node ID.                                                                                                   |
| `slotName` | string    | Yes      | Slot name on the parent.                                                                                          |
| `nodes`    | object\[] | Yes      | Array of node objects. Each: \{ id: string, kind: string, props: \{}, slots?: \{ children: \{ items: \[...] } } } |
| `position` | number    | No       | Insert position. Appends if omitted.                                                                              |

### `remove_node`

Remove a node and all its children from the page.

| Parameter | Type   | Required | Description        |
| --------- | ------ | -------- | ------------------ |
| `nodeId`  | string | Yes      | Node ID to remove. |

### `remove_nodes`

Remove multiple nodes at once in a single undo step.

| Parameter | Type      | Required | Description         |
| --------- | --------- | -------- | ------------------- |
| `nodeIds` | string\[] | Yes      | Node IDs to remove. |

### `move_node`

Move a node to a different parent slot or position.

| Parameter    | Type   | Required | Description                         |
| ------------ | ------ | -------- | ----------------------------------- |
| `nodeId`     | string | Yes      | Node ID to move.                    |
| `toParentId` | string | Yes      | Target parent node ID.              |
| `toSlotName` | string | Yes      | Target slot name.                   |
| `toIndex`    | number | Yes      | Insert position in the target slot. |

### `move_nodes`

Move several nodes into the same parent slot in one undo step, keeping their order. Use it to regroup siblings (e.g. pull three cards into a new grid) instead of moving them one by one.

| Parameter    | Type      | Required | Description                                           |
| ------------ | --------- | -------- | ----------------------------------------------------- |
| `nodeIds`    | string\[] | Yes      | Node IDs to move, in the order they should land.      |
| `toParentId` | string    | Yes      | Target parent node ID.                                |
| `toSlotName` | string    | Yes      | Target slot name.                                     |
| `toIndex`    | number    | Yes      | Insert position of the first node in the target slot. |

### `view_tree`

View the node tree structure of the current page. Shows kind, id, slot info, and key props inline (text content, labels, colors) for efficient scanning. Text bound through xxxToken props is shown resolved, with the token name in parentheses, in the locale currently active in the editor.

| Parameter   | Type    | Required | Description                                                  |
| ----------- | ------- | -------- | ------------------------------------------------------------ |
| `nodeId`    | string  | No       | Start from a specific node. Shows full page tree if omitted. |
| `depth`     | number  | No       | Max depth to traverse. Shows all levels if omitted.          |
| `showProps` | boolean | No       | Show key props inline (default: true).                       |

### `get_subtree`

Get the full JSON of a node and all its descendants. Returns the complete node tree with props and slots — useful for understanding complex structures, duplicating sections, or feeding to another tool.

| Parameter | Type   | Required | Description                            |
| --------- | ------ | -------- | -------------------------------------- |
| `nodeId`  | string | Yes      | Root node ID of the subtree to export. |

### `duplicate_node`

Deep-clone a node and insert the copy right after the original.

| Parameter | Type   | Required | Description           |
| --------- | ------ | -------- | --------------------- |
| `nodeId`  | string | Yes      | Node ID to duplicate. |

### `wrap_nodes`

Wrap one or more sibling nodes in a new layout container.

| Parameter     | Type      | Required | Description                                                     |
| ------------- | --------- | -------- | --------------------------------------------------------------- |
| `nodeIds`     | string\[] | Yes      | Node IDs to wrap (must share the same parent slot).             |
| `layoutKind`  | string    | No       | Wrapper kind (default: Layout.Stack). Default: `"Layout.Stack"` |
| `layoutProps` | object    | No       | Optional props for the wrapper node.                            |

### `swap_kind`

Swap a node's component kind while preserving compatible props. E.g. swap a Stack for a Grid, or a Heading for Text.

| Parameter    | Type   | Required | Description                                  |
| ------------ | ------ | -------- | -------------------------------------------- |
| `nodeId`     | string | Yes      | Node ID to swap.                             |
| `newKind`    | string | Yes      | New node kind (e.g., "Layout.Grid", "Text"). |
| `mergeProps` | object | No       | Additional props to set after swapping.      |

### `set_variant`

Apply a named variant/recipe to a node. Recipes are predefined prop presets for components (e.g., Heading has "hero", "section", "minimal" variants; Button has "primary", "secondary", "outline", "ghost"). Use describe\_node\_kind to see available recipes.

| Parameter     | Type   | Required | Description                                               |
| ------------- | ------ | -------- | --------------------------------------------------------- |
| `nodeId`      | string | Yes      | Node ID to apply the variant to.                          |
| `variantName` | string | Yes      | Variant/recipe name (e.g., "hero", "primary", "outline"). |

***

## Token Tools

Read and write the design/copy tokens of the active page.

### `list_tokens`

List all design/content tokens in the current page. Tokens control colors, text, and localized values.

| Parameter     | Type                                    | Required | Description                                |
| ------------- | --------------------------------------- | -------- | ------------------------------------------ |
| `scope`       | `global` \| `brand` \| `page` \| `node` | No       | Filter by scope.                           |
| `namePattern` | string                                  | No       | Filter token names containing this string. |
| `locale`      | string                                  | No       | Filter by locale (e.g., "fr-FR").          |

### `update_token`

Update the value of an existing token. Applied live in the editor. The token is edited under the scope it already lives in (templates keep their tokens global); a name that does not exist yet is created as a global token.

| Parameter   | Type                                    | Required | Description                                                                           |
| ----------- | --------------------------------------- | -------- | ------------------------------------------------------------------------------------- |
| `tokenName` | string                                  | Yes      | Token name (e.g., "copy.headline", "color.primary").                                  |
| `value`     | any                                     | No       | New value for the token.                                                              |
| `locale`    | string                                  | No       | Locale to update. Updates default if omitted.                                         |
| `scope`     | `global` \| `brand` \| `page` \| `node` | No       | Force a scope instead of reusing the existing token's scope. Rarely needed.           |
| `ownerId`   | string                                  | No       | Owner ID for "page" (page root node ID) or "node" scope. Only with an explicit scope. |

### `add_token`

Add a new token to the current page document. Defaults to global scope, which is what templates and the token resolver expect.

| Parameter | Type                                    | Required | Description                                                                                      |
| --------- | --------------------------------------- | -------- | ------------------------------------------------------------------------------------------------ |
| `name`    | string                                  | Yes      | Token name.                                                                                      |
| `value`   | any                                     | No       | Token value.                                                                                     |
| `scope`   | `global` \| `brand` \| `page` \| `node` | No       | Token scope. "page" and "node" tokens are only resolved when ownerId is set. Default: `"global"` |
| `locale`  | string                                  | No       | Locale. Creates for default if omitted.                                                          |
| `ownerId` | string                                  | No       | Owner ID: the page root node ID for "page" scope, the node ID for "node" scope.                  |

### `remove_token`

Remove a token from the current page.

| Parameter   | Type   | Required | Description                                      |
| ----------- | ------ | -------- | ------------------------------------------------ |
| `tokenName` | string | Yes      | Token name to remove.                            |
| `locale`    | string | No       | Locale of the token. Removes default if omitted. |

### `remove_locale`

Unregister a locale from the current page and delete every token variant written for it. The default-locale values are untouched. Use list\_pages to see registered locales.

| Parameter | Type   | Required | Description                       |
| --------- | ------ | -------- | --------------------------------- |
| `locale`  | string | Yes      | Locale to remove (e.g., "fr-FR"). |

***

## Theme Tools

Palettes, typography presets, and history.

### `apply_palette`

Apply a named color palette to the current page. Changes all color tokens at once. Call list\_palettes first: it returns every palette with its description and primary color (the set grows with Studio; nothing is hardcoded here).

| Parameter     | Type   | Required | Description                                                  |
| ------------- | ------ | -------- | ------------------------------------------------------------ |
| `paletteName` | string | Yes      | Palette name (e.g., "modern", "minimal", "ocean", "sunset"). |

### `apply_custom_palette`

Generate a full, contrast-checked color palette from one brand color and apply it to the current page — the same generator the Studio palette picker uses. Use this when no named palette matches (e.g. colors extracted from a merchant site); prefer exact values over the closest named palette. Returns the generated colors.

| Parameter | Type                              | Required | Description                                              |
| --------- | --------------------------------- | -------- | -------------------------------------------------------- |
| `primary` | string                            | Yes      | Primary brand color: hex, rgb(), hsl() or a named color. |
| `accent`  | string                            | No       | Accent color. Defaults to the complement of primary.     |
| `mode`    | `light` \| `dark`                 | No       | Theme mode (default light).                              |
| `style`   | `vibrant` \| `muted` \| `neutral` | No       | Contrast/saturation style (default vibrant).             |

### `apply_typography`

Apply a named typography preset to the current page. Changes fonts, sizes, and weights. Available presets: modern, bold, elegant, friendly, compact, bloom, technical, minimal, expressive. Use list\_typography\_presets to see all options.

| Parameter    | Type   | Required | Description                                                    |
| ------------ | ------ | -------- | -------------------------------------------------------------- |
| `presetName` | string | Yes      | Typography preset name (e.g., "modern", "elegant", "compact"). |

### `list_palettes`

List all available color palettes with their descriptions and primary colors.

*No parameters.*

### `list_typography_presets`

List all available typography presets with their font families and descriptions.

*No parameters.*

### `undo`

Undo the last change on the canvas.

*No parameters.*

### `redo`

Redo the previously undone change.

*No parameters.*

***

## Schema Tools

Discover node kinds and their props. These work without a connected Studio.

### `list_node_kinds`

List all available node kinds (component types) in Tagada Studio. Optionally filter by category. Use this to discover what components you can add to a template.

| Parameter  | Type   | Required | Description                                                                                                             |
| ---------- | ------ | -------- | ----------------------------------------------------------------------------------------------------------------------- |
| `category` | string | No       | Filter by category: "root", "section", "special", "layout", "content", "commerce", "interactive". Shows all if omitted. |

### `describe_node_kind`

Describe a node kind the way the Studio inspector presents it: one line per prop with its editor type (color, spacing, select, boolean, media, action…), label, accepted values with their labels, default, token twin and responsive eligibility, grouped by inspector section. Also lists slots, recipes for set\_variant, runtime data requirements, the data contract, and visibility rules. Pass full=true for the raw JSON Schema instead.

| Parameter | Type    | Required | Description                                                                         |
| --------- | ------- | -------- | ----------------------------------------------------------------------------------- |
| `kind`    | string  | Yes      | Node kind to describe (e.g., "Heading", "Button", "Layout.Stack", "OrderSummary").  |
| `full`    | boolean | No       | Return the complete JSON (props JSON Schema + metadata) instead of the cheat-sheet. |

***

## Visual Tools

See what the agent built.

### `take_screenshot`

Capture a screenshot of the current page as rendered in Studio. Returns a JPEG image at the requested viewport size. Use this after making changes to visually verify the result. A heavy page takes tens of seconds and Studio captures one at a time, so raise your MCP client call timeout above 120s and do not fire a second capture before the first returns.

| Parameter  | Type                              | Required | Description                                                                                  |
| ---------- | --------------------------------- | -------- | -------------------------------------------------------------------------------------------- |
| `viewport` | `desktop` \| `mobile` \| `tablet` | No       | Viewport size: desktop (1440x900), mobile (375x812), tablet (768x1024). Default: `"desktop"` |
| `quality`  | number                            | No       | JPEG quality from 0.1 to 1. Default 0.8. Default: `0.8`                                      |

***

## Page Tools

Navigate and create funnel pages. Node IDs are per page — call `view_tree` after switching.

### `switch_page`

Switch the editor to another page of the funnel and load its document on the canvas. Every other tool then targets that page. Node IDs are per page: call view\_tree again after switching.

| Parameter | Type   | Required | Description               |
| --------- | ------ | -------- | ------------------------- |
| `pageId`  | string | Yes      | Page ID from list\_pages. |

### `create_page`

Create a new empty page in the funnel and make it active. Returns rootNodeId — use it as parentId for build\_section. Content nodes must live inside Section > Layout.Container, never at the root.

| Parameter | Type                                                         | Required | Description                |
| --------- | ------------------------------------------------------------ | -------- | -------------------------- |
| `type`    | `checkout` \| `offer` \| `landing` \| `thankyou` \| `custom` | Yes      | Page type.                 |
| `name`    | string                                                       | No       | Display name for the page. |

***

## Building Tools

Whole structures in one undo step. These run the same executor as the in-app Studio assistant.

### `build_section`

Build a complete Section > Layout.Container > children structure in ONE undo step — the fastest way to add a full page section. Children may carry their own children for nested layouts (Grid > Card > content). Slots are created automatically. Returns sectionId, containerId and childIds. Include responsive.mobile padding on the section and paddingXMobile on the container (see guide://studio).

| Parameter        | Type      | Required | Description                                                                 |
| ---------------- | --------- | -------- | --------------------------------------------------------------------------- |
| `parentId`       | string    | Yes      | Parent node ID (usually the page root).                                     |
| `slotName`       | string    | No       | Slot name (default "children").                                             |
| `sectionProps`   | object    | No       | Props for the Section (background, padding, responsive…).                   |
| `containerProps` | object    | No       | Props for the Layout.Container (maxWidthToken, textAlign, paddingXMobile…). |
| `children`       | object\[] | No       | Children of the container.                                                  |

### `add_nodes_batch`

Add several flat sibling nodes under one parent slot in a single undo step. Slots are created for container kinds. Returns the new node IDs in order.

| Parameter  | Type      | Required | Description                     |
| ---------- | --------- | -------- | ------------------------------- |
| `parentId` | string    | Yes      | Parent node ID.                 |
| `slotName` | string    | No       | Slot name (default "children"). |
| `nodes`    | object\[] | Yes      | Nodes to add, in order.         |

### `update_tokens_batch`

Update many global tokens in one call — design tokens after apply\_palette / apply\_typography, or a full set of translations for one locale. With `locale`, every token is written as that locale's variant and the result lists the copy.\* tokens still missing a translation (repeat until complete: true).

| Parameter | Type      | Required | Description                                                                   |
| --------- | --------- | -------- | ----------------------------------------------------------------------------- |
| `tokens`  | object\[] | Yes      | Token name/value pairs.                                                       |
| `locale`  | string    | No       | BCP-47 locale applied to every token (e.g. "fr-FR"). Omit for default values. |

***

## Library Tools

The shipped section blocks, the blocks saved on the account and the template library — the same insert paths as the Studio sidebar and Add-Page picker. The page archetypes in `guide://studio` map each page type to block ids. Blocks carry the copy of the template they came from: insert with `placeholders: true`, then fill from `list_text_slots`.

### `list_blocks`

List the ready-made section blocks: the shipped library (hero, nav, offer, social-proof, trust, features, story, product, data, checkout, cta, thankyou) plus the blocks saved on the account. Returns id, category, description and top-level kinds. Insert one with insert\_block — faster and more polished than composing sections from primitives. The page archetypes in guide://studio map each page type to block ids.

| Parameter  | Type   | Required | Description                                                                      |
| ---------- | ------ | -------- | -------------------------------------------------------------------------------- |
| `category` | string | No       | Category id to filter on (see the categories list in the result).                |
| `query`    | string | No       | Free-text search over id, name, description and category (all terms must match). |

### `insert_block`

Insert a block from list\_blocks into the page in ONE undo step, with fresh node ids. Section-rooted blocks go under the page root (the default parent); card blocks need a parentId inside a section. IMPORTANT: the blocks were lifted from real template pages, so each one arrives selling that page's product (olive oil, work boots…). Pass placeholders: true to strip that copy, or rewrite every slot with list\_text\_slots + update\_nodes\_batch. A page composed of blocks you did not rewrite advertises several unrelated products at once.

| Parameter      | Type    | Required | Description                                                                                                                                                                                          |
| -------------- | ------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `blockId`      | string  | Yes      | Block id from list\_blocks.                                                                                                                                                                          |
| `parentId`     | string  | No       | Parent node id (default: the page root).                                                                                                                                                             |
| `slotName`     | string  | No       | Slot name (default "children").                                                                                                                                                                      |
| `position`     | number  | No       | Insert position (0-based). Appends if omitted.                                                                                                                                                       |
| `placeholders` | boolean | No       | Replace the block's copy with short generic labels and its images with a neutral placeholder, so nothing from the source product survives. Use it whenever you are going to write the copy yourself. |

### `list_text_slots`

List every piece of copy under a node — the text a merchant would rewrite, without the layout, style or data props. Returns `props` (rewrite them all in ONE update\_nodes\_batch) and `arrays` (FAQ items, review rows: write the whole items array back on its node). Use it after insert\_block or add\_page\_from\_template instead of hunting through view\_tree.

| Parameter | Type   | Required | Description                               |
| --------- | ------ | -------- | ----------------------------------------- |
| `nodeId`  | string | No       | Subtree to scan (default: the page root). |

### `list_templates`

Search the template library (sales pages, advertorials, listicles, VSLs, checkouts, thank-you pages, landings). Returns id, name, category, description and keywords. Start from one with add\_page\_from\_template instead of building a page from scratch.

| Parameter  | Type   | Required | Description                                                                                |
| ---------- | ------ | -------- | ------------------------------------------------------------------------------------------ |
| `category` | string | No       | Category id: sales, vsl, checkout, thank-you, advertorial, landing, funnelish.             |
| `query`    | string | No       | Free-text search over id, name, description, category and keywords (all terms must match). |

### `add_page_from_template`

Add a new page to the funnel from a library template — a full copy with fresh node ids and the store branding applied — and make it active. Returns rootNodeId and rootChildCount. Checkout and thank-you templates force their page type; pass type "offer" for upsell/downsell templates. Then view\_tree and rewrite the copy for the product.

| Parameter    | Type                             | Required | Description                                                                    |
| ------------ | -------------------------------- | -------- | ------------------------------------------------------------------------------ |
| `templateId` | string                           | Yes      | Template id from list\_templates.                                              |
| `name`       | string                           | No       | Display name for the page (default: the template name).                        |
| `type`       | `landing` \| `offer` \| `custom` | No       | Page type when the template category does not dictate one (default "landing"). |

***

## Localization Tools

Token-based i18n: register locales, tokenize copy, write translations.

### `list_locales`

List the locales registered on the page and the one the editor currently previews.

*No parameters.*

### `add_locale`

Register a locale on the page before writing its translations. Does not switch the preview.

| Parameter | Type   | Required | Description                                       |
| --------- | ------ | -------- | ------------------------------------------------- |
| `locale`  | string | Yes      | BCP-47 locale code (e.g. "fr-FR", "es", "de-DE"). |

### `set_active_locale`

Switch the canvas preview to a locale so the user sees translated values. Empty string = default locale. View-only, nothing is written.

| Parameter | Type   | Required | Description                                    |
| --------- | ------ | -------- | ---------------------------------------------- |
| `locale`  | string | No       | Locale to preview; omit or "" for the default. |

### `prepare_translation_pack`

Canonical entry point for translating a page. Walks each node's schema, auto-tokenizes every translatable text prop with a stable copy.\{nodeId}.\{prop} name and returns the complete list of \{tokenName, defaultValue} pairs to translate. Skips design tokens, brand names, currency codes and format placeholders. Then write the translations with update\_tokens\_batch(locale).

| Parameter | Type      | Required | Description                                                              |
| --------- | --------- | -------- | ------------------------------------------------------------------------ |
| `nodeIds` | string\[] | Yes      | Every node ID on the page (from view\_tree); non-text nodes are skipped. |

### `tokenize_text`

Lift one raw text prop into a global copy token and bind the node's \{propName}Token to it, so the text becomes localizable. For whole-page work prefer prepare\_translation\_pack.

| Parameter      | Type   | Required | Description                                  |
| -------------- | ------ | -------- | -------------------------------------------- |
| `nodeId`       | string | Yes      | Node ID.                                     |
| `propName`     | string | Yes      | Raw text prop (content, label, title…).      |
| `tokenName`    | string | Yes      | Token name in the copy.\* namespace.         |
| `defaultValue` | string | Yes      | The current raw text (default-locale value). |

### `tokenize_texts_batch`

Tokenize many raw text props in one call (one UPDATE\_PROPS per node). Fails before any write if a node ID is stale.

| Parameter | Type      | Required | Description          |
| --------- | --------- | -------- | -------------------- |
| `items`   | object\[] | Yes      | Tokenize operations. |

***

## Content Tools

Source content through the Studio session: page extraction, image import, image generation.

### `fetch_url`

Extract an external page with a headless browser (runs through the Studio session): structure, text, images uploaded to blob storage, colors, fonts, studioTokens ready for update\_tokens\_batch, a build\_section-compatible nestedStructure per section, screenshots and a quality report. Takes up to 90s, so raise your MCP client call timeout above 120s before using it. If it times out anyway, retry with captureScreenshot: false and viewports: \["desktop"] — a text-only extraction still returns the structure, studioTokens and nestedStructure. Follow the URL reproduction workflow in guide://studio.

| Parameter           | Type      | Required | Description                                                                                                       |
| ------------------- | --------- | -------- | ----------------------------------------------------------------------------------------------------------------- |
| `url`               | string    | Yes      | URL to extract.                                                                                                   |
| `maxImages`         | number    | No       | Max images to extract and upload (default 50).                                                                    |
| `captureScreenshot` | boolean   | No       | Capture page screenshots (default true). false is much faster on heavy pages and loses only the visual reference. |
| `viewports`         | string\[] | No       | Viewports to screenshot (default all three). Each one costs time; \["desktop"] is the cheap retry.                |

### `fetch_section_detail`

Full detail for one section of the last fetch\_url extraction (content, layout tree, images, section screenshot URL, nestedStructure). Cached on the Studio side — no new browser launch.

| Parameter      | Type   | Required | Description                                |
| -------------- | ------ | -------- | ------------------------------------------ |
| `sectionIndex` | number | Yes      | 0-based section index from the extraction. |

### `import_images`

Upload external image URLs to blob storage and get stable URLs for Media.Image src props.

| Parameter | Type      | Required | Description          |
| --------- | --------- | -------- | -------------------- |
| `urls`    | string\[] | Yes      | Image URLs (max 50). |

### `generate_images`

Generate images with AI (FAL.ai, via the Studio session) and get blob URLs for Media.Image src. Hero banners, feature illustrations, product mockups, backgrounds — not icons or logos. Max 6 per call, 5-15s each, run in parallel. Write detailed prompts: style, mood, subject, composition, palette colors.

| Parameter | Type      | Required | Description                 |
| --------- | --------- | -------- | --------------------------- |
| `images`  | object\[] | Yes      | Images to generate (max 6). |

## MCP Resources

The server also exposes two **resources** agents can read:

| URI                         | Description                                                                                                               |
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| `schema://node-definitions` | JSON Schema of every node kind, with inspector metadata, recipes and data contracts (see `list_node_kinds` for the count) |
| `template://current`        | Live template from the connected Studio editor                                                                            |

***

## Endpoints

The HTTP server exposes these endpoints:

| Endpoint                       | Description                                      |
| ------------------------------ | ------------------------------------------------ |
| `GET /ws`                      | WebSocket — Studio editor connects here          |
| `GET /sse`                     | SSE — MCP agents connect here                    |
| `POST /messages?sessionId=...` | MCP message relay                                |
| `GET /health`                  | Health check (includes Studio connection status) |
| `GET /`                        | Server info                                      |
