Before executing the specific method, read Craft scenario commands and parameters, and execute according to the object selection, session, input replacement, and result checking described therein.
Connection and Execution
First check the current MCP's tool list and editor_status. When create_node、run_command、inspect_document is available, 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 the enhanced Web must occur on the same page that is open and ready. The official original Web 0.6.0 only has an interactive screen, and file services are not yet implemented; when these MCP tools are absent, you must not pretend that edits or saves have been made. Standalone native figcraft-cli mcp is a separate session, and switching must be clearly communicated. When the CLI is available, use figcraft-cli commands --json to check commands; do not install missing tools on your own.
Reference:FigCraft v0.6.0 MCP、CLI. Commands are subject to the currently loaded version.
Work Steps
- Inventory existing colors, text styles, and repeated structures, and agree on naming and component boundaries first; preserve existing instance relationships.
- Query style.create and variable-related commands; create color, font size, and spacing variables, name them semantically, and establish light and dark mode mappings.
- Query component.create and instance.place, and turn buttons, input fields, and cards into components; create state and size variants according to the actual schema, and record the returned IDs.
- Place instances on the example page; modify the main component and check whether instance inheritance and manual overrides behave as expected. Test long copy, disabled, and error states.
- Check variable bindings and style links, and compare themes with screenshots; save .figcraft, reopen it and verify that instances and variables still exist, and deliver the component table and usage instructions.