Skip to main content
Glama

figma_import_html

Import HTML prototypes into Figma as editable frames: renders pages in headless Chrome, captures boxes, text, gradients, and SVG, then rebuilds each screen on a Figma page.

Instructions

Import an HTML prototype into Figma at full fidelity for almost no tokens: renders it in headless Chrome, serializes the painted result (boxes, colors, gradients, shadows, radii, text, inline SVG) and builds it on a page. With no targets, every screen on a review board (nested .sc-host) is imported and named by its label. Use dryRun to list screens first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
gapNo
fileYesPath to the .html file
onlyNoKeep only screens whose name contains one of these strings
pageNoPage to build on (created if missing)
rootNoDirectory to serve (default: the file's grandparent, so ../fonts works)
swapsNoReplace matching elements with instances of existing components. Variant = first rule whose test matches, else default; an unknown variant is an error, never a silent fallback.
dryRunNo
actionsNoClicks to perform before capturing (open menus, advance steps)
fontMapNoReplace font families, e.g. { "YekanBakhFaNum": "IRANYekanX" }
replaceNoRemove an existing section with the same name on that page first
sectionNoWrap the screens in a Figma section with this name
targetsNoCSS selectors of the elements to import as screens
componentsNoTurn each imported root into a component. Names like "Wish card/State=Chosen" are combined into component sets.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It reveals meaningful behavior: fidelity approach (headless Chrome + serialization of boxes/colors/gradients/shadows/radii/text/SVG), naming by screen label, and the 'almost no tokens' characteristic. It omits prerequisites (Figma connection, serving requirements beyond default root), reversibility of edits, and error behavior. Adequate but with gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three information-dense sentences front-load the core purpose and then describe default behavior and a pre-step. No filler, though the opening is packed with layers that could be structured as a list for faster scanning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 13 parameters, no annotations, and no output schema, the description is reasonably complete for the core call but thin on behavioral contracts for the many optional parameters (swaps, components, page/section/replace semantics). It should do more to compensate for the missing annotation and output schema coverage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 85%, so the schema already documents most parameters. The description adds value only for dryRun and the default-targets behavior; it does not explain the complex nested structures (swaps, targets, actions) beyond what the schema and its inline descriptions already convey. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Specific verb+resource ('Import an HTML prototype into Figma') with an explicit pipeline (headless Chrome render, serialize painted result, build on page). The default behavior with no targets is spelled out ('every screen on a review board ... imported and named by its label'), distinguishing it from siblings like figma_scan_design_system.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides clear usage context: when targets is empty, all screens on a review board are imported; 'Use dryRun to list screens first' is a concrete pre-step. However, it never names an alternative tool (e.g., import_html_to_plan / figma_execute_plan) or when to prefer those, so it does not reach 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.