Tools
This is a reference catalogue. Tools cannot be configured or run from this page.
Get artifact
MAGIC_PATTERNS_MCP_GET_ARTIFACTGets the active artifact for a design, including its ID and list of files. Use this to discover the current artifact before reading files or creating a new artifact branch. Because the editor is collaborative, always call this (or get_design_status) to get the LATEST active artifact — do not rely on a previously cached artifact ID. NEXT STEPS: - Call read_artifact_files(artifactId, fileNames) to read code. - Call create_new_artifact(artifactId, name) to create a working copy before making changes.
Get design status
MAGIC_PATTERNS_MCP_GET_DESIGN_STATUSGets the current status of a design: whether AI generation is active, the active artifact ID, and available files. ALWAYS call this before starting new work on an existing design. The user or other agents may have changed the active artifact, sent prompts, or made edits in the UI since you last checked. This is your source of truth for the current state. Also use this to poll for completion after create_design (with prompt) or send_prompt. RESPONSE: - isGenerating: true if AI is still working - activeArtifactId: the current active artifact ID (use for create_new_artifact, read_artifact_files, etc.) - availableFiles: list of file names in the active artifact NEXT STEPS: - If isGenerating=true: Wait at least 60 seconds before polling again. Generation can take up to 10 minutes. - If isGenerating=false: Use activeArtifactId with create_new_artifact (for code-first edits) or read_artifact_files (to inspect generated code).
Get design system
MAGIC_PATTERNS_MCP_GET_DESIGN_SYSTEMResolves a design system's active artifact and lists its files. ALWAYS call this first — design systems are collaborative, so the active artifact id can change between calls; never reuse a cached artifactId. Returns: - artifactId: the current active artifact (pass as baseArtifactId to write_design_system_files to detect drift) - files: the persisted files (e.g. components/<Name>/*, index.css, tailwind.config.js, rules/*) - hasUnpublishedChanges: whether the active artifact differs from the latest published version - guide: pointer to the design_system_authoring_guide prompt — load it before writing files NEXT STEPS: - read_design_system_files(designSystemId, fileNames) to read file contents - write_design_system_files(designSystemId, files) to create or update files - publish_design_system(designSystemId) to publish a new version
Get editor id from url
MAGIC_PATTERNS_MCP_GET_EDITOR_ID_FROM_URLResolves a Magic Patterns URL to an editor ID. Use this when the user shares a Magic Patterns link and you need the editorId for subsequent operations like send_prompt or get_design_status. NEXT STEPS: Use the returned editorId with send_prompt, get_design_status, get_artifact, or other editor-scoped tools.
Get inspiration document
MAGIC_PATTERNS_MCP_GET_INSPIRATION_DOCUMENTLoads a Magic Patterns inspiration document by its id. An inspiration document is a set of design "concepts" (variants) — each a self-contained HTML sketch of a UI direction. Use this when the user asks to implement/build a specific concept from a Magic Patterns inspiration (e.g. "Implement Concept B from Magic Patterns inspiration <id>"). Pass the inspiration id as `inspirationId`. RESPONSE: - title, userPrompt: the original request the concepts explore - viewport: the canvas the concepts were authored against (absent = 1280x800 desktop). Any concept you regenerate must be authored at these exact dimensions. - status: 'generating' while concepts are still being produced, else 'ready'/'error'. - variants: the concepts, in order. Concept A = variants[0], Concept B = variants[1], etc. Each has { id, name, description, implementationPrompt, html, status }. A variant is only usable once its `status` is 'ready'; a non-ready one has empty/partial `html` and must NOT be recreated (retry after generation finishes). NEXT STEPS: Pick the referenced concept (by letter/name), confirm its `status` is 'ready', then recreate its `html` as a React + TypeScript component in the user's project, keeping the styling 1:1 (same layout, colors, spacing, typography; copy SVGs verbatim).
List design systems
MAGIC_PATTERNS_MCP_LIST_DESIGN_SYSTEMSLists the design systems available to the authenticated user. Returns both built-in (reserved) design systems and any custom design systems the user has created or has access to. Use this when the user mentions a specific design system (e.g. "use Shadcn", "with my company design system") so you can resolve the correct ID to pass to create_design. Each result includes: - id: The unique design system ID to pass to create_design - name: The human-readable name - isReserved: Whether it is a built-in preset (e.g. Base, Shadcn, MUI) - isActive: Whether this is the user's currently active design system
List version history
MAGIC_PATTERNS_MCP_LIST_VERSION_HISTORYLists the artifact version history for a design. Returns the most recent 20 versions with their artifact IDs, version labels, and titles. Use the skip parameter to paginate backwards. Because the editor is collaborative, new versions may have been created by the user or AI since you last checked. Use this alongside get_design_status to understand the full picture. Each version corresponds to a snapshot of the design's code at a point in time. Use the artifactId from a version entry to read_artifact_files for that version, or create_new_artifact to branch from it.
Read artifact files
MAGIC_PATTERNS_MCP_READ_ARTIFACT_FILESReads the contents of one or more files from an artifact. IMPORTANT: Always read files BEFORE making changes with write_artifact_files so you understand the current state. This code is meant as a starting point or inspiration. It is NOT production-ready. You should adapt this code to match the user's project style, frameworks, libraries, and conventions.
Read design system files
MAGIC_PATTERNS_MCP_READ_DESIGN_SYSTEM_FILESReads the contents of one or more files from a design system's active artifact. Design system file structure: - components/<Name>/index.tsx — component source (named exports only) - components/<Name>/<Name>.previews.tsx — preview definitions; default-export a ComponentPreviewModule with componentName, importPath, and previews - components/<Name>/Context.md — AI/usage documentation - index.css — design system styles / Tailwind imports - tailwind.config.js — Tailwind configuration - rules/<slug>.md — design rules Call get_design_system first to discover available file names. Always read before editing.
Read recent message history
MAGIC_PATTERNS_MCP_READ_RECENT_MESSAGE_HISTORYReads the recent chat item history for a design. Returns the last 10 chat items (user prompts, AI responses, artifact versions, edits). Use the skip parameter to paginate backwards through older items. Because the editor is collaborative, the user may have sent prompts or made changes in the UI between your tool calls. Use this to catch up on what happened and understand the current context before acting. Note: Code contents are omitted from the response to keep it concise. Use read_artifact_files to read full file contents.