Tools
This is a reference catalogue. Tools cannot be configured or run from this page.
Create artboard
WONDER_MCP_CREATE_ARTBOARDCreates an artboard from the root JSX in code. The canvas is a whiteboard: one artboard holds one design. A set of separate items (options, concepts, logos, icons, illustrations, empty states, the states or variants of a button or card, moodboard images) is one artboard per item, sized to that item and laid out side by side, never wrapped in a board, sheet, showcase or page frame and never given a page skeleton, title header or viewport. A group's caption is its own small text artboard. One frame holds several items only when the user asks for one composed piece (a slide, a poster, a diagram) or a library import's Design Guide nests them. A multi-section page starts as a two-level skeleton: one placeholder div per section, each holding divs for its parts, sized and laid out (w-, h-, min-h-, flex, grid, gap), unstyled, with specific Title Case labels for what they become (Plan Columns, not Plan Columns Skeleton). If unsure whether it is a page or a standalone design of one block, add it. For app reproductions, read source structure first. Fill sections as their inputs become known; skeletons show structure, not substantive content or finished designs. The directives that build a section replace or delete its skeleton placeholders, so none survives next to real content. The result holds a tree per created or changed element, one line per element with its tag, data-node-id and data-node-label, and every id the document assigned: target those ids next without another read. A tree longer than 300 lines comes back as its root line plus "… N more elements — read the tree with get_element_tree"; read it before building into it. Its first line is the artboard root, which you build into with update_elements. Colour: a file token's cssVar, made with the change if none holds it; a literal or palette class only if the user asks. Other values a token holds use its cssVar too. Icons: the file's library (import { X } from 'wonder-icons'), else react-icons, imported at the top; never emoji.
Create design tokens
WONDER_MCP_CREATE_DESIGN_TOKENSCreates design tokens in the file. All or nothing: an entry that fails changes nothing, and the result names it. An alias may name a token earlier in the call. Where the source layers semantic names over a raw palette, keep both layers: create the raw token first, then the semantic token as its alias, never flattening the reference to its resolved value. Returns the created names and the file's tokens with each cssVar. Check the file's tokens and icon catalog before adding to them, and reuse a match by value and by role instead of adding a near-duplicate or a literal beside it.
Create file
WONDER_MCP_CREATE_FILECreates a Wonder design file on the server and returns its fileId, first pageId, branchName and a url for your reply; nothing opens on the user's screen. Never create a Wonder file on your own, even when no file is attached or open: create one only when the user asks for a new file or picks one when you ask. When the request names no file and none is open, look through the user's files with list_files for the file and page the work fits best, then ask where it should go with your host's question tool, falling back to your reply only when it has none, offering that place, another of their files and a new file (one choice per organization when they have more than one). It goes into organizationId, else nearFileId's organization, else the user's only one; when several fit and you named none, the result lists them. Rename it later with rename_file. Files cannot be deleted here: the user deletes them in Files.
Create folder
WONDER_MCP_CREATE_FOLDERCreates a folder in the user's Files, at the organization's root or inside parentFolderId, and returns its folderId for create_file. Create one when the user asks, or when their files already live in folders (folderName in list_files) and the file you are about to create belongs in one that is missing. The organization is chosen as for create_file.
Create icons
WONDER_MCP_CREATE_ICONSAdds icons to the file's library: up to 20 ({ name, svg, keywords? }, markup within 500000 characters in all). The server sanitizes each svg: a viewBox is kept or synthesized, and monochrome paints become currentColor. Returns created names, skipped duplicates and per-item errors. Bind an icon by the componentName the catalog returns, never one built from its name: a name collision adds a suffix and a rename changes it, so read the names back after creating, importing or renaming icons. Check the file's tokens and icon catalog before adding to them, and reuse a match by value and by role instead of adding a near-duplicate or a literal beside it. Rename or delete tokens and icons only when the user asks, and add an icon only when the user asks or a design built from their code needs it.
Create page
WONDER_MCP_CREATE_PAGEAdd a page to a Wonder file, named by its fileId or by the pageId of any page in it, at the end of its page list unless afterPageId places it. It runs on the server and needs no editor, and it never moves anyone's view: everyone who has the file open sees the new page appear in their page list and stays on the page they are on. The answer carries the new page's pageId, which every page-scoped tool takes at once. Put new canvas work on its area's page: the page you hold when it fits, else the file's page for that product area, flow or kind of work, even under a broader name. Add a page only when asked or none covers the area, and make it the page for the whole area, not this one design.
Create prototype
WONDER_MCP_CREATE_PROTOTYPECreates a working prototype from canvas frames: a node on the canvas that plays a React module built from them, for everyone in the file. A prototype of canvas frames, or a change to one, is made with the prototype tools, never in the repository, the Preview or a dev server. Call it as soon as you know the frames: a prototype node sized from them appears beside them, building while you write its module. Returns the prototypeId, its revision, the frames' code (no need for get_element_code) and the rules for writing the module; read them, then write the whole module with update_prototype.
Delete design tokens
WONDER_MCP_DELETE_DESIGN_TOKENSDeletes design tokens by name. All or nothing: an entry that fails changes nothing, and the result names it. Deleting a token or icon unbinds its uses: bound elements keep the last value or markup and stop updating, and tokens aliased to a deleted token fall back to its value. Returns the deleted names, the count restyled and the remaining tokens. Rename or delete tokens and icons only when the user asks, and add an icon only when the user asks or a design built from their code needs it.
Delete elements
WONDER_MCP_DELETE_ELEMENTSDeletes elements with their whole subtrees; an artboard root's id deletes the artboard. Deleting a main component leaves its instances in place with their look and values, their main missing until someone restores it. Pass every id in one call. Returns a result per id.
Delete icons
WONDER_MCP_DELETE_ICONSDeletes icons from the file's library by name. All or nothing: an entry that fails changes nothing, and the result names it. Deleting a token or icon unbinds its uses: bound elements keep the last value or markup and stop updating, and tokens aliased to a deleted token fall back to its value. Returns the deleted names and the remaining catalog. Rename or delete tokens and icons only when the user asks, and add an icon only when the user asks or a design built from their code needs it.
Duplicate elements
WONDER_MCP_DUPLICATE_ELEMENTSDuplicates an element and its whole subtree. The source may be an in-tree element or an artboard root: the subtree is copied, and only where the copy lands differs. A duplicated main is an instance. When asked for a code component and its placements, reuse a matching canvas node or build it first, standalone if requested, otherwise at its first call site. Place copies with one duplicate_elements call, varying text and className with propertyOverrides; never rewrite each copy, and a duplicated instance stays linked. Fill placements as their source details are known, keeping surrounding UI. Repeated items in a new design (cards, rows, features) are one .map() over an inline data array in a single insert, with the layout classes on the div that wraps it. On a new artboard, placement attributes apply to its root element only, never to a nested label. An artboard-root source with targetParent and position nests its subtree under the target. A variation is a copy of the original placed as its own artboard (duplicate_elements with newArtboard true) and changed there, so it sits beside the original for comparison and never replaces it. The result holds a tree per created or changed element, one line per element with its tag, data-node-id and data-node-label, and every id the document assigned: target those ids next without another read. A tree longer than 300 lines comes back as its root line plus "… N more elements — read the tree with get_element_tree"; read it before building into it. It returns {"trees": [...], "newDuplicateIds": [...]}: one tree per copy, never the container the copies landed in, and trees[i] belongs to newDuplicateIds[i], each copy's root id in copy order. When the copies' trees pass 1200 lines together, every tree comes back as its root line, and trees past even that are replaced by one final "… N more trees — read them with get_element_tree" entry. A copy that could not be read back holds its place with a one-line note naming its id.
Edit prototype
WONDER_MCP_EDIT_PROTOTYPEEdits a prototype's module with small exact replacements (old text → new text); do not rewrite the whole file for a small change. Each edit's old_string must match the current code exactly once (or set replace_all); edits apply in order, and all of them or none are saved. Wonder builds, runs and saves the result like update_prototype, and the canvas plays the new revision. Read the prototype with read_prototype before your first change.
Fetch image content
WONDER_MCP_FETCH_IMAGE_CONTENTFetches an image's pixels as base64 with its contentType, so you can look at it. Pass assetId or a public url. When a text summary is enough, fetch_image_description is cheaper.
Fetch image description
WONDER_MCP_FETCH_IMAGE_DESCRIPTIONFetches a text description of an image: cheaper than its pixels when you only need to know what it shows. Pass assetId or a public url. Image generation and vectorizing read a reference image themselves, so hand them the image (attached, selected, generated earlier, a search result or a URL in element code), never its description, and never run fetch_image_description on it first.
Find elements
WONDER_MCP_FIND_ELEMENTSFinds elements by free-form queries ("hero section", "button that says Sign Up", "green rounded card"), several per call, each ranked on its own against labels, span text and className tokens, or a component's name or id. Each match carries an ancestry breadcrumb, and its JSX too with includeCode. Use it when you know what an element is but not its data-node-id.
Finish artboard
WONDER_MCP_FINISH_ARTBOARDMarks an artboard you created or changed as finished and returns its design link. It changes nothing on the canvas: your edits were saved as they ran. Call it once per artboard, after its last edit, and never for one you only read.
Generate image
WONDER_MCP_GENERATE_IMAGEGenerates a raster image from a prompt and, unless placeOnCanvas is false, places it on the canvas as a new artboard. Returns the image URL, its size and the artboard's dataNodeId. Optional imageUrls guide a remix or a style. Photos and other raster images come from generate_image, a new vector drawn from a description from generate_svg, and a vector traced from one supplied image from vectorize_image; offer generate_svg when the user wants a restyle rather than a trace.
Generate svg
WONDER_MCP_GENERATE_SVGGenerates a vector SVG from a prompt. Generating an SVG and vectorizing an image are for an explicit request (an SVG, a logo, a mascot or an illustration; trace, vectorize or convert this image): each takes 30 to 90 seconds and a paid model call, places its own artboard and returns the dataNodeId to continue from. A design's own imagery uses icons or photos instead. Optional references (up to 14) ground the style or subject. Photos and other raster images come from generate_image, a new vector drawn from a description from generate_svg, and a vector traced from one supplied image from vectorize_image; offer generate_svg when the user wants a restyle rather than a trace.
Get additional context
WONDER_MCP_GET_ADDITIONAL_CONTEXTReads the context around one or more elements: their artboard, depth, parent, siblings, children and subtree size. Use it to decide whether to read deeper with get_element_tree or get_element_code. Unknown ids come back as error entries.
Get artboards
WONDER_MCP_GET_ARTBOARDSLists the page's top-level artboards with data-node-id, label, position and size (x, y, width, height in canvas pixels, y downward), descendant count and depth, and up to 8 top-level children; a root or child that is a main component or an instance says so. A null x, y, width or height is unknown, not zero: the editor has not measured that artboard yet, so read it again with get_artboards once it has rendered. The coordinates are the ones data-component-x and data-component-y take on an artboard root, so you can place a new artboard or move one by editing its root. Elements nested deeper, such as what a library import places inside its artboard, are not listed; find them with find_elements.