figma_export_web_handoff
Write a complete web handoff bundle for one Figma frame: PNG previews, spec.json layer boxes and text, design tokens, README limits and hashes, so developers get exact specs instead of generated HTML.
Instructions
Write a web handoff bundle for one frame: preview.png (1x), an optional preview@Nx.png, spec.json with every layer's absolute box, text, paints and effects, tokens.json and tokens.css (colours, fonts, text classes, spacing), a README that states what the bundle does NOT carry, and handoff.json with hashes and counts. One call writes one folder and every file is re-read from disk. Read-only for the document — it works with write access off. Refuses above 2,500 nodes, 24 MP per preview or 8 MiB per PNG instead of truncating; font availability is checked within a time budget, and a font the check could not confirm is reported as unchecked, not assumed present. The reply separates the phases by time — walkMs reading the tree, checkMs pinging fonts, exportMs rasterising — so a call that took minutes names the phase that took them. This is a specification, not generated production HTML.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "figma_export_web_handoff"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scale | No | Scale of the second preview (preview@Nx.png); 1 means only preview.png | |
| nodeId | No | The frame, component or section to hand off; defaults to the single selected node | |
| outDir | No | Parent directory for the bundle; the bundle gets its own folder named after the node | |
| fileKey | No | Which connected Figma file to use: its fileKey (figma_whoami) or, when omitted, the only connected file. Required once more than one file is connected; figma_ping lists them. |