mcp

v0.16.3
io.github.swebsy/mcp Checked 5 hours ago Published 22 days ago

Build and edit real websites in Swebsy Studio from your coding agent — no per-token AI fees.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

swebsy_replace_page_content Replace page content

Replace ALL top-level sections of the CURRENTLY SELECTED page with a generated list of components. This OVERWRITES the page — it does NOT create a new page (use `create_page`) and does NOT append a single section (use `add_section`). Use when the user asks to build/replace/redesign an entire page. Each top-level component should be wrapped in a container.

ParameterTypeDescription
components *arrayTop-level page components (sections). Each should be wrapped in a container.
plan *stringA 1-2 sentence summary of the sections you will create and why. This surfaces as an assistant message.

swebsy_create_page Create page

Create a NEW blank page in the project and (by default) select it. Returns the new page's id and fileName. The page starts nearly empty — fill it with `replace_page_content` or `add_section`, and point a navbar/link at it with `link_page`. Use THIS to add an additional page; use `replace_page_content` (NOT this) to overwrite the current page's content.

ParameterTypeDescription
name *stringDisplay name / title for the page (e.g. 'About').
fileNamestringOptional URL slug without .html (e.g. 'about'). Use `/` to put the page in a folder: 'blog/first-post' is served at /blog/first-post, 'docs/index' at /docs/. Defaults to a flat slug derived from `name…
selectbooleanSelect the new page after creating it. Default true.

swebsy_update_page Update page

Rename a page and/or change its URL slug — the Pages panel's rename. Links that pointed at the old `./slug.html` on every page follow the new slug. The home page's `index` slug is locked (its display name can still change).

ParameterTypeDescription
page *stringPage id, name or current slug (from `list_pages`).
fileNamestringNew URL slug without .html (e.g. 'pricing', or 'blog/launch' for a page in a folder). Sanitized and de-duplicated against other pages.
namestringNew display name.

swebsy_duplicate_page Duplicate page

Copy a page (content, classes and styles) into a new page and select the copy. Returns the new page's id and fileName. Use it to start a page from an existing layout instead of rebuilding it.

ParameterTypeDescription
page *stringPage id, name or slug to copy.
namestringName for the copy. Defaults to "<name> (copy)".

swebsy_delete_page Delete page

Delete a page. The home page (index) and a site's last page can't be deleted. Links to the deleted page are left in place — repoint them with `link_page` or delete them.

ParameterTypeDescription
page *stringPage id, name or slug to delete.

swebsy_add_section Add section

Insert a new section into the current page. Use for adding discrete sections (hero, features, pricing, CTA) to an existing page. Supply exactly one of `component` (a component tree) or `html` (one root element). Appends to the end by default; to place it somewhere specific, pass `position` plus the `targetPath` of the component to place it next to.

ParameterTypeDescription
summary *string1 sentence describing what this section does.
componentobjectThe section component to insert. Omit when sending `html`.
htmlstringThe section as HTML with a single root element (e.g. one <section>). No data-gjs-* attributes. Omit when sending `component`.
positionstringWhere 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` w…
targetPatharrayZero-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 `po…

swebsy_edit_section Edit section

Modify an existing component. By default this edits the selected component. To edit a component identified by `read_page`, provide its `targetId` (preferred — survives other edits) or `targetPath`; an explicit target overrides the canvas selection. Preferred: provide `component` — the full replacement component tree (compact DSL OK), best for structural changes. Alternative: provide `html` — the complete modified HTML string. Fallback: provide `patch` — JSON Patch (RFC 6902) for tiny single-property tweaks. Supply exactly one. Preserve existing IDs: an id kept in the edit keeps the sty…

ParameterTypeDescription
summary *string1 sentence explaining what the edit does.
componentobjectFull replacement component tree. Use compact DSL (t/c/x/a/k) to save tokens. Preserve existing attributes.id values. A `style` object merges into the styles already on that id, so you only send the de…
htmlstringThe complete modified HTML for the target component. Prefer existing semantic/theme classes over raw Tailwind utilities. Preserve existing id attributes.
patcharrayJSON Patch (RFC 6902) operations applied to the target component JSON. Only for tiny single-property tweaks. HTML attributes live under /attributes (an image's src is /attributes/src), classes at /cla…
targetIdstringThe component to edit by its id, as `read_page` shows it after `#` (e.g. "ieyubib", or "call-2-2" in a symbol instance). Stays valid when other components move or are added, unlike a path. Pass this O…
targetPatharrayZero-based component indexes from the current page root, exactly as returned by the most recent `read_page` call (for example [0] for the first top-level section or [0, 2] for its third child). Use th…

swebsy_delete_section Delete section

Remove a component from the current page entirely. Use this instead of emptying a section's contents — an emptied section leaves a stray blank div on the page. Deletes the selected component by default; pass `targetId` or `targetPath` (from `read_page`) to delete a component you did not select.

ParameterTypeDescription
summary *string1 sentence naming what is being removed.
targetIdstringThe component to delete by its id, as `read_page` shows it after `#` (e.g. "ieyubib", or "call-2-2" in a symbol instance). Stays valid when other components move or are added, unlike a path. Pass this…
targetPatharrayZero-based component indexes from the current page root, exactly as returned by the most recent `read_page` call. Omit to delete the selected component.

swebsy_move_section Move section

Move a component to just before or after another component on the current page — reorder sections, swap columns, lift a CTA above the footer. The component keeps its id, classes and id-styles. ALWAYS use this to reorder; delete + re-add loses the component's styles. Name each side by id (`targetId`/`anchorId`) or by path (`targetPath`/`anchorPath`).

ParameterTypeDescription
anchorIdstringThe component to place it next to by its id, as `read_page` shows it after `#` (e.g. "ieyubib", or "call-2-2" in a symbol instance). Stays valid when other components move or are added, unlike a path.…
anchorPatharrayPath (from the same `read_page`) of the component to place it next to.
positionstringWhich side of the anchor. Default after.
targetIdstringThe component to move by its id, as `read_page` shows it after `#` (e.g. "ieyubib", or "call-2-2" in a symbol instance). Stays valid when other components move or are added, unlike a path. Pass this O…
targetPatharrayPath (from the most recent `read_page`) of the component to move.

swebsy_wrap_section Wrap section

Wrap a run of sibling components in one new element, optionally with a semantic tag — e.g. put everything between the navbar and footer in `<main>`, or a footer symbol in `<footer>`. The wrapped components keep their ids, id-styles and symbol links. ALWAYS use this to add a wrapper; re-sending the components through `edit_section`/`replace_page_content` loses their styles. Paths shift — call `read_page` before the next path-based edit.

ParameterTypeDescription
targetPath *arrayPath (from the most recent `read_page`) of the first component to wrap.
customNamestringLayers-panel label, e.g. "Main content".
endPatharrayPath of the last component to wrap, a later sibling of targetPath. Everything between them is wrapped too. Omit to wrap only targetPath.
tagNamestringWrapper tag. Default div. One `main` per page, never inside header/footer/nav/aside/article.

swebsy_duplicate_section Duplicate section

Copy a component (with its classes and styles) and insert the copy right after it. Paths after it shift by one — call `read_page` before the next path-based edit (ids don't shift).

ParameterTypeDescription
targetIdstringThe component to copy by its id, as `read_page` shows it after `#` (e.g. "ieyubib", or "call-2-2" in a symbol instance). Stays valid when other components move or are added, unlike a path. Pass this O…
targetPatharrayPath (from the most recent `read_page`) of the component to copy.

swebsy_insert_block Insert block

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).

ParameterTypeDescription
blockId *stringThe block ID from the catalog (e.g., 'clarity-content-with-image').
adaptationsobjectStructured customizations applied to the block before insertion.
positionstringWhere 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` w…
targetPatharrayZero-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…

swebsy_update_settings Update settings

Update site settings — SEO title/description, site URL, structured data (JSON-LD), per-page SEO overrides, language/direction, theme tokens (light + dark), type scale, animation defaults, Google and uploaded fonts, dark mode toggle, site-wide custom CSS for component-level restyling (globalTheme.customTailwindConfig), favicon, robots.txt/sitemap/service worker/security headers/image optimization (performance), analytics ids, custom head/body code (advanced), the "Made with Swebsy" badge (branding) and the deploy target (deploy). Provide ONLY the fields that change. `general`/`seo` are SITE-W…

swebsy_commit_design_direction Commit design direction

Commit this site to a specific visual direction, and apply it (fonts, type roles, palette swatches). Call this ONCE, BEFORE generating a new site's first page — a site with no committed direction has nothing for later edits to stay consistent with, and the result drifts to generic. Prefer a `directionId` from the sampled menu; supply the `custom` fields only when the user's brief clearly calls for something the menu doesn't cover. Not needed when editing a site that already has a direction.

ParameterTypeDescription
customobjectA direction you authored, when no menu entry fits the brief. Must be as specific as a menu entry — a face with actual character, a real palette, a named signature move.
directionIdstringId of a direction from the sampled menu (e.g. 'oat-editorial'). Preferred over `custom`.

swebsy_animate_page Animate page

Apply Swebsy's built-in scroll-reveal animation in one step — a smart, per-section staggered entrance on headings, text, images, buttons, and cards (navbars/footers skipped). Prefer this over hand-placing animate-* classes whenever the user asks to animate the page or site, or wants a consistent reveal.

ParameterTypeDescription
scopestringAnimate just the current page (default) or every page in the site.

swebsy_read_page Read page

Read the current page structure: each line shows a component's target path and its `#id`. edit_section, delete_section, move_section, duplicate_section and link_page take either — prefer the id (`targetId`), which survives moves and inserts; other tools take the path. Use the id only to target; don't copy auto ids into markup. Call this BEFORE editing a named or relative page component that is not the current selection. The default `sections` read lists every top-level section with its target path — enough to pick the one to edit. To find a nested element (a link, button, card) pass that s…

ParameterTypeDescription
depthintegerOptional. How many levels of the indexed tree to print below the section layer (default 1 = each section only, deeper nodes summarised as '(N descendants)'). Every printed line keeps its target path.…
detailstring'sections' (default): every section at the read root with its target path, an ~80-char text preview, and its descendant count — bounded and complete (~1-2 KB). 'outline': a deeper type/tag/class tre…
targetPatharrayOptional. Zero-based component indexes from the page root (as returned by a prior read_page) that scope the read to that ONE subtree instead of the whole page. Strongly recommended with `detail: full`…

swebsy_get_skill Load guidance

Load deep, on-demand guidance for a specific area before acting on it (e.g. before adding animations, composing a new page, writing copy, building forms, editing the nav, or reusing components with symbols). Returns the full instructions for that skill.

ParameterTypeDescription
skill *stringWhich skill's guidance to load.

swebsy_publish Publish site

Publish the open site to Swebsy Hosting, free, at its own swebsy.site address, and return the live URL. Call it ONLY after the user has said yes to publishing in this conversation, and ask again before every publish, a republish included: an earlier yes doesn't carry over. If it can't go live straight away (no account yet, a plan limit, something to check), nothing goes out yet: Studio opens its Publish screen and the result says what to tell the user. When it says Studio finishes publishing from there, don't call publish again; the site goes live once the user is done.

swebsy_start_pairing Start pairing

Start a pairing session. Returns a single-use `pairUrl` — give it to the user to click; opening it connects their Studio tab automatically. (Also returns the raw `code`/`port` for manual entry.)

swebsy_status Check connection

Report bridge status, siteName, selected page, and editorReady, plus a short theme summary (fonts, default color mode, brand colors). After creating or opening a site, wait until editorReady is true and siteId matches the expected site before editing.

ParameterTypeDescription
verbosebooleanAlso return the full site settings object (all theme tokens + custom CSS). Default false — the summary answers 'am I connected and what is open?'.

swebsy_list_pages List pages

List the project's pages (id, name, fileName, section count, which one is selected). Call this instead of guessing a page name for select_page or link_page.

swebsy_list_templates List templates

Refresh and list installed site templates with names, descriptions, tags, fonts, preview URLs, and thumbnail URLs. Works from Home or Studio.

swebsy_create_site Create site

Create a site and open it in Studio. Pass name to set its internal Studio/Home name (default "My Website"). Omit templateId for Swebsy's standard blank site; provide an installed template ID to import that template unchanged. Then poll swebsy_status until editorReady is true and siteId matches before editing.

ParameterTypeDescription
namestringOptional internal site name (trimmed). Not the SEO or public title.
templateIdstringOptional installed template ID from swebsy_list_templates. Omit for a blank site.

swebsy_list_sites List sites

List saved sites newest-first as metadata only: IDs, internal names, status, timestamps, template ID, page count, and whether each site is open.

swebsy_open_site Open site

Open a saved site by ID in the paired tab and return its metadata. Idempotent if it is already open. Poll swebsy_status for the expected siteId and editorReady before editing.

ParameterTypeDescription
siteId *stringAuthoritative site ID from swebsy_list_sites.

swebsy_rename_site Rename site

Rename a saved site's internal Studio/Home name. This does not change its SEO or public title settings.

ParameterTypeDescription
name *stringNew non-empty internal site name (trimmed before saving).
siteId *stringAuthoritative site ID from swebsy_list_sites.

swebsy_select_page Select page

Select a page in the connected Studio project.

ParameterTypeDescription
page *stringPage id or name to select.

swebsy_read_selection Read selection

Read the currently selected component (type, classes, attributes, text). Secrets are never surfaced.

swebsy_list_symbols List symbols

List the project's SYMBOLS (reusable components that stay in sync across every page). Returns each symbol's id, name, component type, instance count, and how many pages use it, plus a `health` report of BROKEN linkage: `orphans` (copies whose main was deleted — editing them changes nothing elsewhere), `unregistered` (instances the main doesn't list back, so edits propagate one way only) and `ghosts`. Repair any of it by calling promote_to_symbol on one affected section. Use before add_symbol_instance to find the symbol id.

swebsy_promote_to_symbol Promote to symbol

Promote an existing component into a reusable SYMBOL so it can be shared, in sync, across pages. Pass its `targetPath` from read_page (e.g. the navbar or the CTA band). Also REPAIRS broken linkage (see list_symbols → health): re-promoting an orphaned copy rebuilds its main and re-links every other copy of it, and re-promoting a symbol registers instances it had lost. Returns the symbol id (for add_symbol_instance) and a `repaired` count; copies whose structure has diverged too far are reported as `detached` — delete_section + add_symbol_instance those instead.

ParameterTypeDescription
targetPath *arrayZero-based component indexes from the current page root, exactly as returned by read_page (e.g. [0] for the first top-level section).
namestringOptional friendly name for the symbol (e.g. 'Navbar').

swebsy_add_symbol_instance Add symbol instance

Add a linked INSTANCE of an existing symbol (see list_symbols) to the CURRENT page. The instance stays in sync with the symbol main and every other instance — the way to reuse one navbar/footer/CTA across pages. Select the target page with select_page first.

ParameterTypeDescription
symbolId *stringId of the symbol main (from list_symbols).
positionstringWhere to place it on the page: 'start' prepends (e.g. a shared navbar), 'end' appends (e.g. a shared footer). 'before-selected'/'after-selected' land it next to `targetPath` — how you put a shared C…
targetPatharrayZero-based component indexes from read_page identifying the section to sit next to. Required for 'before-selected'/'after-selected' — an agent has no canvas selection.

swebsy_detach_symbol Detach symbol

Turn ONE symbol instance on the current page back into a plain component, so it can be edited on its own. The symbol and its other instances stay linked. Use it when one page needs a variant of the shared navbar/footer.

ParameterTypeDescription
targetPath *arrayPath of the symbol instance, from read_page.

swebsy_rename_symbol Rename symbol

Rename a symbol (the name shown in the Symbols panel).

ParameterTypeDescription
name *string
symbolId *stringSymbol id from list_symbols.

swebsy_delete_symbol Delete symbol

Delete a symbol. Every instance is DETACHED first and stays on its page as a plain component — nothing disappears from the site. To also remove the copies, delete_section them.

ParameterTypeDescription
symbolId *stringSymbol id from list_symbols.

swebsy_undo Undo

Revert your own last editing tool call(s) this session (add/edit/delete/move/duplicate_section, insert_block, update_settings, page tools…), newest first. Does NOT undo symbol or asset tools. Refuses (returns `blocked`) when a page, CSS or settings it would restore has been edited since, so hand edits are never overwritten. Paths may shift — call read_page afterwards.

ParameterTypeDescription
stepsintegerHow many tool calls to revert. Default 1.

swebsy_redo Redo

Re-apply tool calls reverted by swebsy_undo, oldest-undone last. Cleared by any new edit.

ParameterTypeDescription
stepsinteger

swebsy_get_builder_guide Load builder guide

Load the static Swebsy builder guidance (component system, theme classes, conventions) that the in-app AI Builder is primed with.

swebsy_list_skills List guidance topics

List the available deep-guidance skills (animation, page-composition, copywriting, forms, nav) with one-line summaries.

swebsy_list_blocks List blocks

List the pre-built block catalog (ids + labels) available to insert_block.

swebsy_capture Take screenshot

Capture a styled screenshot of the current page at a fixed viewport, written under .swebsy-agent/screenshots/. Returns the file path. Scope it with `targetPath` when verifying ONE section — a whole-page PNG downscales so far that component detail is unreadable.

ParameterTypeDescription
viewport *stringmobile=390px, tablet=768px, desktop=1280px, wide=1536px.
selectionOnlybooleanCapture only the selected component instead of the full page.
targetPatharrayOptional. Capture only the component at this read_page target path (e.g. [3] for the fourth section) instead of the whole page.

swebsy_list_assets List assets

List managed assets in the open site with whole-project usage counts. References are checked across every page, shared symbols, styles, and site settings. Use imagesOnly:true and unusedOnly:true before deleting unused gallery images.

ParameterTypeDescription
imagesOnlybooleanReturn only image MIME types. Default false.
unusedOnlybooleanReturn only assets with no references anywhere in the project. Default false.

swebsy_upload_asset Upload asset

Upload a local image, font, video, audio or PDF file into the open site and return its `assetId`, `src` and a `usage` snippet. Images go in the asset library for `image` components, video for `video` components (`attributes.src`), audio for `audio`, PDFs as a link `href`; fonts are stored for `update_settings` fonts.custom. This is the ONLY way to get your own imagery (screenshots, logos, textures, mockups) into a site — an `image` with an empty src gets a random stock photo instead. Reads the file from the agent's own filesystem, so pass a path you can see (for example a screenshot you just…

ParameterTypeDescription
filenamestringOptional display name in the asset library, single `path` only. Defaults to the file's own basename.
pathstringAbsolute path to the file on the agent's machine. Pass `path` or `paths` (exactly one). Images: .png, .jpg, .jpeg, .webp, .gif, .avif, .svg. Fonts (for `update_settings` fonts.custom, pass the returne…
pathsarrayBatch form: absolute paths of up to 25 files (same types and 10 MB cap as `path`). Pass `path` or `paths` (exactly one). Each file is uploaded on its own, so one bad file lands in `failed` without sto…

swebsy_delete_asset Delete asset

Delete one managed asset from the open site's asset gallery. By default this refuses assets referenced by any page, shared symbol, style, or site setting; call swebsy_list_assets first. force:true also clears live component references and should be used only when that is explicitly intended.

ParameterTypeDescription
assetId *stringManaged asset ID returned by swebsy_list_assets.
forcebooleanAllow deleting an in-use asset and clearing its live references. Default false.

swebsy_export Export

Export the site to .swebsy-agent/exports/. Static files via the site exporter and/or the project JSON (with assets). Returns `outDir`, the exported page paths, and per-kind file counts — verify a build by grepping those HTML files.

ParameterTypeDescription
baseUrlstringBase URL for absolute links in the static export.
includeProjectJsonbooleanWrite the portable project JSON + assets. Default false.
includeStaticbooleanWrite the static HTML/CSS/JS export. Default true.
minifybooleanMinify static output.
verbosebooleanReturn every written file path (fonts and assets included) instead of the page list + counts. Default false.