Skip to content

Tools ​

Plumb exposes twenty-eight MCP tools, all reading from or writing to one shared semantic design graph — split across the two directions it plumbs — design → code (Figma or the live web, read) and prompt → design (write). Each tool has a focused, single responsibility; the agent composes them.

Read — Figma → code ​

Extract a design as a compact spec, build it, then diff the render against the design and self-heal to a pixel-perfect match.

ToolWhat it does
plumb_statusSelf-description, key legend, connection state. Call first.
plumb_outlineEvery screen in the file (id, name, size).
plumb_nodeExtract a screen as compact PDS — by id or by name. collapseRoles semantically compresses matched sections (nav/hero/footer/sidebar/card/button) to a one-line summary.
plumb_queryPull a slice of a screen by pattern (skeleton / buttons / text / components / role) when the full tree would blow the token budget.
plumb_describeText-only visual description — per-region narrative + child summary, for image-blind harnesses or token-conscious flows.
plumb_tokensDesign-token table (colours, type, radii, shadows).
plumb_selectionThe user's live Figma selection.
plumb_assetsExport icons (SVG) + images (PNG) — three modes.
plumb_screenshotRender any node to PNG/JPG.
plumb_searchFind nodes by name and/or type.
plumb_componentsList components + instance usages. health: true adds a design-system health report (unused components, near-duplicate names, variant outliers).
plumb_verifyDiff your rendered layout against the design — ΔE2000 colour distance, shadow/rotation/flex-child/fill-stack checks.
plumb_fitThe self-healing loop: plumb_verify plus a 0–100 convergence score and prioritised fixes, so the agent iterates to pixel-perfect instead of one-shot checking.
plumb_fig_outlineHeadless: list every screen in a saved .fig file from disk.
plumb_fig_nodeHeadless: fetch one node from a saved .fig file by id.
plumb_diffSemantic diff between two PDS snapshots — narrated deltas ("the hero moved from (0, 0) to (0, 120)"), not a JSON diff.
plumb_auditHeuristic accessibility checks — text contrast against its resolved background, button touch-target size.
plumb_import_webImport a live webpage's structure and semantics via headless Chrome — no Figma connection needed.
plumb_emit_reactDeterministic React/JSX generator — works on a PDS or a plumb_import_web result, same emitter either way.
plumb_scan_referencesScan N live reference URLs and return a per-role (nav/hero/footer/card) style digest — concrete exemplars to inform a plumb_design DSL or plumb_studio brief.

Write — prompt → design (the director) ​

Turn a one-line brief into a full, on-brand Figma design: research real reference sites, extract a brand, compose the page from real nodes, then critique the render and iterate — with no extra API key, because the agent driving the MCP server is the creative director.

ToolWhat it does
plumb_studioThe design director. One brief → researched references → extracted brand → a full composed Figma page (nav, hero, features, gallery, CTA, footer). Returns the node ids + authored spec so you can critique and refine.
plumb_studio_start / plumb_studio_kit / plumb_studio_pageThe same director flow, split into three watchable steps — open a session with a brand + references, build the reusable component library, then compose one or more product pages (landing / features / pricing / dashboard) against it — instead of one opaque call.
plumb_brandBrief → live-screenshots best-in-class reference sites + a synthesized brand palette / type board (real Figma Variables + text styles) on the canvas.
plumb_designAuthor a design from Plumb's high-level Design DSL and build it into Figma — full control over pages, sections, blocks, and brand tokens. The refine step of the loop (mode:"sync").
plumb_reviewThe critique loop — the mirror of plumb_fit. Blends a structural diff, a deterministic design rubric, and the calling agent's own vision verdict into one score + ranked fixes.
plumb_sourceResolve on-brief assets (icons, photos, avatars, illustrations, patterns) for a design — ranked candidates or a downloaded best match.

Tool selection ​

If you only remember three per direction:

Read (design → code):

  • plumb_outline — figure out which screens exist.
  • plumb_node — get the design spec for one of them.
  • plumb_fit — build it, then iterate to a pixel-perfect match (or plumb_verify for a one-shot check).

Write (prompt → design):

  • plumb_studio — a brief becomes a full, on-brand Figma page in one call.
  • plumb_review — screenshot the build, grade it yourself, and get a ranked fix list.
  • plumb_design — apply those fixes with mode:"sync" and loop until done.

The rest are how the agent fills in the details — exports, screenshots, search, design tokens, component awareness, sliced queries for dense screens, text descriptions for image-blind harnesses, brand research, and asset sourcing.

How the agent picks paths ​

Most read tools accept either id (canonical) or name (looked up against the live outline). Pass id whenever you have it; it's unambiguous. Names can be duplicated — Plumb handles that by returning a list of matches for the agent to disambiguate.

Read tools that need design data auto-pick between the plugin path (instant, no rate limits, requires Figma open) and the REST path (headless, rate-limited, requires FIGMA_TOKEN). With the plugin paired, omit fileKey. For REST, pass fileKey + id.

The plugin-path tools — plumb_outline, plumb_selection, plumb_assets, plumb_screenshot, plumb_search, plumb_components — require the plugin paired and won't fall back to REST. The other read tools (plumb_node, plumb_query, plumb_describe, plumb_tokens, plumb_verify, plumb_fit) work on both paths. plumb_diff, plumb_audit, and plumb_emit_react are a third category — they touch neither Figma path at all, operating only on documents you already have (pass the raw JSON from a prior plumb_node/plumb_outline/plumb_query/plumb_import_web call). plumb_import_web is a fourth category on its own — it needs no Figma connection whatsoever, driving its own headless Chrome against any URL instead.

Every write tool builds through the plugin path — plumb_studio, plumb_studio_start/plumb_studio_kit/plumb_studio_page, plumb_brand, and plumb_design all require the Plumb plugin paired to write to Figma (plumb_design can dryRun to compile + validate without it). plumb_review is read-only — it grades the emitted result — and plumb_source needs no Figma connection at all.

Released under the MIT License.