Before executing the specific method, read Craft scenario commands and parameters, and execute according to the object selection, session, input replacement, and result checks therein.
Connection and execution
First check the current MCP tool list and editor_status. When create_node、run_command、inspect_document is present, use the actual tool JSON schema; do not guess parameters. Use list_commands to find the commands and parameters needed for this scenario, then execute.
MCP operations on enhanced Web must occur on the same page that is open and ready. The official original Web 0.6.0 has only the interactive view, and file services are not yet implemented; when these MCP tools are absent, do not pretend to have edited or saved. The standalone native figcraft-cli mcp is another session; switching must be explicitly communicated. When the CLI is available, use figcraft-cli commands --json to check commands; do not install missing tools yourself.
Reference:FigCraft v0.6.0 MCP、CLI. Commands are subject to the currently loaded version.
Work steps
- Preserve the original input files. List the file formats, associated images, and fonts, and confirm the new paths in the target project; REST JSON images go in their adjacent images directory.
- Import using open_file or the existing figcraft-cli convert; .fig is best-effort compatible, read the actual returned warnings, and do not claim pixel-perfect fidelity.
- Use inspect_document to verify the page count, top-level frames, component instances, variables, and prototypes; record missing images, font substitutions, and unsupported effects item by item.
- Compare screenshots of key pages against the original, and prioritize fixing layout, copy, and key visuals; prefer editable structure, and any necessary rasterization must be explicitly communicated.
- Save the new .figcraft file, reopen it, and export PNG; deliver the migrated project, previews, and loss list, and avoid overwriting the input .fig.