Skip to main content
Glama
Figma Local Bridge

Figma Local Bridge

by Miart

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

NameRequiredDescriptionDefault
scaleNoScale of the second preview (preview@Nx.png); 1 means only preview.png
nodeIdNoThe frame, component or section to hand off; defaults to the single selected node
outDirNoParent directory for the bundle; the bundle gets its own folder named after the node
fileKeyNoWhich 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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.36.0

TDQS

A4/5.0
Behavior5/5

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

With zero annotations the description carries the full burden and does so: it states the document is untouched ('Read-only for the document — it works with write access off'), that one call writes one folder, that every file is re-read from disk, and that hard limits (2,500 nodes, 24 MP, 8 MiB) cause a refusal rather than silent truncation. It also discloses that unconfirmed fonts are reported as 'unchecked' rather than assumed present, and that the reply is phase-timed (walkMs/checkMs/exportMs) — behaviour an agent could not infer from any structured field.

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?

Front-loaded with the deliverable list, then limits, then runtime semantics — a sensible order with no filler sentences. It is a single dense block whose runtime/latency clauses are packed together, which costs a little scannability but every clause carries substantive information.

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

Completeness5/5

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

No output schema exists, yet the description still explains the shape of the reply (per-phase timings, hashes and counts in handoff.json) and pre-empts the main failure modes (size/node caps, unchecked fonts, missing write access). For a multi-file export tool this covers everything an agent needs to call it and interpret the result.

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 100%, so scale, nodeId, outDir and fileKey are already documented in the schema, including the preview@Nx.png meaning and the default-to-selection behaviour. The description reinforces the one-frame-per-call model and the folder-naming consequence but adds no syntax, format, or edge-case detail beyond what the schema provides — baseline 3.

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

Purpose4/5

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

A specific verb+resource ('Write a web handoff bundle for one frame') followed by an enumeration of exactly what lands on disk (preview.png, preview@Nx.png, spec.json, tokens.json/css, README, handoff.json). The closing line 'This is a specification, not generated production HTML' implicitly separates it from build/production tools like figma_build, but no sibling such as figma_export_build_spec is named outright.

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

Usage Guidelines3/5

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

Scope is implied clearly (one frame per call, scale controls the second preview, fileKey needed once multiple files are connected), which gives an agent enough to decide eligibility. However there is no explicit when-to-use/when-not-to-use statement and no named alternative for the neighbouring export tools (figma_export_build_spec, figma_export_ui_atlas), leaving the routing decision to inference.

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