Create Design
create_designFull Description
Creates a new Magic Patterns design. This is the starting point for both prompt-based and code-first workflows.
BEHAVIOR:
- With prompt: Creates a design and kicks off AI generation (long-running, especially when design-system setup is involved). Do not wait synchronously; poll get_design_status to track progress.
- Without prompt: Creates a blank design with scaffold files (App.tsx, index.tsx, index.css, tailwind.config.js) — returns immediately.
- With templateId: Forks an existing design first, then optionally applies the prompt to the fork. The templateId is an editor ID — you can get it from a design URL (the ID in magicpatterns.com/c/<id>) or via get_editor_id_from_url.
You can optionally specify a design system. If the user mentions one, call list_design_systems first.
NEXT STEPS:
- With prompt: Call get_design_status(editorId) to poll until generation completes. This often takes a while, so the caller should keep polling instead of assuming the design is ready immediately.
- Without prompt: Call get_design_status(editorId) to get the active artifact, then create_new_artifact to start editing.
Parameters (0 required, 6 optional)
designSystemstringOptional design system name (e.g. "Shadcn", "MUI"). Resolved case-insensitively. designSystemId takes precedence if both provided.
designSystemIdstringOptional design system ID. Use list_design_systems to discover IDs.
imageUrlsarrayOptional image URLs as visual references (only used with prompt).
namestringOptional name for the design. Defaults to "Untitled".
promptstringOptional natural language prompt for AI generation. If omitted, a blank design with scaffold files is created instantly.
templateIdstringOptional editor ID of an existing design to use as a template. The design will be forked first, then any prompt is applied to the fork. Get the ID from the design URL (magicpatterns.com/c/<id>) or via get_editor_id_from_url.