Design Tool
Tool Reference
Complete reference for all 39 MCP tools available in the Efecto Design Tool. Each tool can be called via MCP or the REST API.
Quick start
npx @efectoapp/mcp installData Model
Efecto documents are built from artboards and nodes. The document is serialized as JSX-like markup where each element has a data-id attribute.
Node Types
| Type | Description |
|---|---|
frame | Container element (div) |
text | Text element (p, h1-h6, span) |
image | Image element |
button | Button with variant support |
link | Anchor link |
icon | Icon element |
input | Form input |
video | Video element |
component | Reusable component instance |
Styling
All styling uses Tailwind CSS via the className property. You can also use style for inline CSS when needed (especially for dynamic colors).
Tailwind v4 runtime note
bg-[#f9f9f9] may not work at runtime because Tailwind 4 generates CSS at build time. For dynamic hex colors, use the style property or the set_fill tool.Artboard Sizes
| Device | Width | Height |
|---|---|---|
| Desktop | 1440 | 900 |
| Tablet | 768 | 1024 |
| Mobile | 375 | 812 |
Session Tools (3)
Manage the lifecycle of a design session. The MCP process tracks the active session so you don't need to pass the session ID to every tool.
create_sessionCreate a new session. Returns a URL the user opens in their browser. Once connected, all design tools execute in real-time. Only one session is active at a time.
| Parameter | Type | Required | Description |
|---|---|---|---|
label | string | no | Human-readable label (e.g. "Landing page design") |
// Create a session
create_session({ label: "Landing page design" })
// → Returns { designUrl: "https://efecto.app/design?session=abc123" }session_statusCheck if the browser is connected, pending calls, etc.
| Parameter | Type | Required | Description |
|---|---|---|---|
sessionId | string | no | Defaults to active session |
close_sessionClose the active session. Disconnects the browser and cleans up.
| Parameter | Type | Required | Description |
|---|---|---|---|
sessionId | string | no | Defaults to active session |
Reading Tools (5)
Inspect the current document state. Always read the document before making edits.
get_documentReturns the full document as JSX-like markup. Each element has a data-id for referencing in other tools. Always call this before modifying an existing design.
get_selectionReturns the currently selected nodes with serialized JSX subtrees. Use to understand user context before making edits.
list_artboardsLists all artboards with IDs, names, dimensions, and positions.
find_nodesSearch for nodes by name, text content, type, or className.
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | no | Search term (matches name and text, case-insensitive) |
type | string | no | frame | text | image | button | link | icon | input | video | component |
classNameContains | string | no | Filter by className substring |
get_node_treeReturns JSX for a specific node or artboard subtree (faster than get_document for one section).
| Parameter | Type | Required | Description |
|---|---|---|---|
nodeId | string | yes | ID of the node or artboard to serialize |
Creating Tools (4)
Add new content to the document. Use add_section for complex layouts and add_node for single elements.
create_artboardCreates a new artboard. Set className to "flex flex-col" for vertical layout.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | yes | Name of the artboard |
width | number | yes | Width in CSS pixels (default: 1440) |
height | number | yes | Height in CSS pixels (default: 900) |
x | number | no | Horizontal position on canvas |
y | number | no | Vertical position on canvas |
backgroundColor | string | no | Background color as hex (default: "#ffffff") |
className | string | no | Tailwind CSS classes |
create_artboard({
name: "Desktop",
width: 1440,
height: 900,
className: "flex flex-col",
backgroundColor: "#ffffff"
})add_sectionAdds a complete section from JSX-like markup. Most efficient for complex layouts.
| Parameter | Type | Required | Description |
|---|---|---|---|
parentId | string | yes | ID of the parent artboard or node |
jsx | string | yes | JSX-like markup with HTML tags and Tailwind className |
index | number | no | Insert position (appends if omitted) |
add_section({
parentId: "artboard-1",
jsx: `<section className="flex flex-col items-center justify-center py-24 px-8 bg-black text-white">
<h1 className="text-6xl font-bold tracking-tight mb-4">Build faster</h1>
<p className="text-xl text-gray-400 max-w-2xl text-center">Ship beautiful products with AI-powered design.</p>
<button className="mt-8 px-8 py-3 bg-white text-black rounded-full font-medium">Get Started</button>
</section>`
})add_nodeAdds a single node to the document tree.
| Parameter | Type | Required | Description |
|---|---|---|---|
parentId | string | yes | ID of the parent artboard or node |
type | string | yes | frame | text | image | button | link | icon | input | video | component |
tag | string | no | HTML tag to render |
className | string | no | Tailwind CSS classes |
textContent | string | no | Text content |
src | string | no | Image/video source URL |
alt | string | no | Alt text for images |
href | string | no | Link URL |
variant | string | no | primary | secondary | outline | ghost | destructive |
style | object | no | Inline CSS styles |
replace_sectionReplaces an existing node with new JSX content in-place. Preserves position in parent.
| Parameter | Type | Required | Description |
|---|---|---|---|
nodeId | string | yes | ID of the node to replace |
jsx | string | yes | JSX-like markup for the replacement |
Modifying Tools (5)
Update existing nodes without replacing them entirely.
update_nodeUpdates properties of an existing node. Only specified properties are changed.
| Parameter | Type | Required | Description |
|---|---|---|---|
nodeId | string | yes | ID of the node to update (from data-id) |
className | string | no | New Tailwind classes |
textContent | string | no | New text content |
tag | string | no | Change HTML tag |
style | object | no | Inline CSS styles |
src | string | no | Image/video source |
variant | string | no | Button variant |
update_node({
nodeId: "node-abc123",
textContent: "New heading text",
className: "text-4xl font-bold text-white"
})update_classUpdates only the className of a node. Replaces existing className entirely.
| Parameter | Type | Required | Description |
|---|---|---|---|
nodeId | string | yes | Node ID |
className | string | yes | New Tailwind classes (replaces all) |
batch_updateUpdates multiple nodes in a single call. Efficient for bulk changes.
| Parameter | Type | Required | Description |
|---|---|---|---|
updates | array | yes | Array of { nodeId, className?, textContent?, style? } |
batch_update({
updates: [
{ nodeId: "node-1", textContent: "Updated" },
{ nodeId: "node-2", className: "text-red-500" },
]
})update_artboardUpdates artboard properties (resize, rename, change background).
| Parameter | Type | Required | Description |
|---|---|---|---|
artboardId | string | yes | ID of the artboard to update |
name | string | no | New name |
width | number | no | New width |
height | number | no | New height |
backgroundColor | string | no | New background color |
className | string | no | Tailwind classes |
set_fillSets the fill (background) of a node or artboard. Supports solid colors, gradients, and images. Handles dual-write automatically.
| Parameter | Type | Required | Description |
|---|---|---|---|
targetId | string | yes | ID of the node or artboard |
fill | object | no | Fill config: { type: "solid"|"gradient"|"image", color?, gradient?, url? }. Omit to clear. |
Organizing Tools (8)
Restructure the document tree — move, duplicate, group, and delete nodes.
move_nodeMoves a node to a new parent or reorders within current parent.
| Parameter | Type | Required | Description |
|---|---|---|---|
nodeId | string | yes | Node to move |
newParentId | string | yes | New parent node/artboard |
index | number | no | Position in parent |
duplicate_nodeDuplicates a node and all its children. Inserted after the original.
| Parameter | Type | Required | Description |
|---|---|---|---|
nodeId | string | yes | Node to duplicate |
duplicate_artboardDuplicates an entire artboard with all content. Creates a deep copy with fresh IDs.
| Parameter | Type | Required | Description |
|---|---|---|---|
artboardId | string | yes | Artboard to duplicate |
newName | string | no | Name for the copy |
offsetX | number | no | Horizontal offset from original |
group_nodesGroups selected nodes into a new frame container.
| Parameter | Type | Required | Description |
|---|---|---|---|
nodeIds | string[] | yes | Node IDs to group |
ungroup_nodeUngroups a frame container, moving its children up to the parent.
| Parameter | Type | Required | Description |
|---|---|---|---|
groupId | string | yes | ID of the group/frame to ungroup |
reorder_nodeChanges z-order: "front" = bring to top, "back" = send to bottom.
| Parameter | Type | Required | Description |
|---|---|---|---|
nodeId | string | yes | Node to reorder |
position | string | yes | "front" or "back" |
delete_nodesDeletes one or more nodes and all their children.
| Parameter | Type | Required | Description |
|---|---|---|---|
nodeIds | string[] | yes | Array of node IDs to delete |
delete_artboardDeletes an artboard and all its contents.
| Parameter | Type | Required | Description |
|---|---|---|---|
artboardId | string | yes | ID of the artboard to delete |
Canvas & Viewport (6)
Manage the document and viewport.
new_documentCreates a new blank document, replacing the current one. Discards unsaved changes.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | no | Name for the new document |
rename_documentRenames the document.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | yes | New name |
undoUndoes the last action (Cmd+Z).
redoRedoes the last undone action (Cmd+Shift+Z).
zoom_to_fitZooms the viewport to fit all artboards. Useful after creating multiple artboards.
zoom_to_artboardZooms the viewport to fit a specific artboard.
| Parameter | Type | Required | Description |
|---|---|---|---|
artboardId | string | yes | ID of the artboard to zoom to |
Selection & Visibility (3)
select_nodesSelects nodes on the canvas to highlight for the user. Empty array deselects all.
| Parameter | Type | Required | Description |
|---|---|---|---|
nodeIds | string[] | yes | Node IDs to select |
deselect_allDeselects all currently selected nodes.
set_visibilityShows or hides a node. Hidden nodes remain in the tree but are not rendered.
| Parameter | Type | Required | Description |
|---|---|---|---|
nodeId | string | yes | Node ID |
visible | boolean | yes | true to show, false to hide |
Layout Tools (4)
Align, distribute, and position elements on the canvas.
align_nodesAligns multiple nodes along a shared axis.
| Parameter | Type | Required | Description |
|---|---|---|---|
nodeIds | string[] | yes | Node IDs to align (min 2) |
alignment | string | yes | left | center | right | top | middle | bottom |
distribute_nodesDistributes nodes evenly with equal spacing.
| Parameter | Type | Required | Description |
|---|---|---|---|
nodeIds | string[] | yes | Node IDs to distribute (min 3) |
direction | string | yes | "horizontal" or "vertical" |
move_artboardRepositions an artboard on the canvas. Use to lay out multi-screen flows (e.g. Desktop at 0,0, Tablet at 1540,0).
| Parameter | Type | Required | Description |
|---|---|---|---|
artboardId | string | yes | Artboard to move |
x | number | yes | New X position |
y | number | yes | New Y position |
set_viewportSets the viewport zoom level and/or pan position. Zoom 1.0 = 100%.
| Parameter | Type | Required | Description |
|---|---|---|---|
zoom | number | no | Zoom level (0.1 to 5.0) |
panX | number | no | Horizontal pan offset |
panY | number | no | Vertical pan offset |
Export (1)
export_imageExports an artboard or node as an image (PNG, JPEG, WebP, SVG). Returns base64 data URL.
| Parameter | Type | Required | Description |
|---|---|---|---|
artboardId | string | yes | Artboard to export |
nodeId | string | no | Specific node to export |
format | string | no | png | jpeg | webp | svg (default: png) |
scale | number | no | Scale multiplier 1-4 (default: 1) |
quality | number | no | Quality 0-1 for JPEG/WebP (default: 0.92) |