Skip to main content
Glama

21st.dev Magic AI Agent

by zackbissell

21st_magic_component_builder

Generate React-based UI component snippets for buttons, forms, tables, and more. Integrate snippets into your codebase by editing or adding files directly.

Instructions

"Use this tool when the user requests a new UI component—e.g., mentions /ui, /21 /21st, or asks for a button, input, dialog, table, form, banner, card, or other React component. This tool ONLY returns the text snippet for that UI component. After calling this tool, you must edit or add files to integrate the snippet into the codebase."

Input Schema

NameRequiredDescriptionDefault
absolutePathToCurrentFileYesAbsolute path to the current file to which we want to apply changes
absolutePathToProjectDirectoryYesAbsolute path to the project root directory
contextYesExtract additional context about what should be done to create a ui component/page based on the user's message, search query, and conversation history, files. Don't halucinate and be on point.
messageYesFull users message
searchQueryYesGenerate a search query for 21st.dev (library for searching UI components) to find a UI component that matches the user's message. Must be a two-four words max or phrase

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "absolutePathToCurrentFile": { "description": "Absolute path to the current file to which we want to apply changes", "type": "string" }, "absolutePathToProjectDirectory": { "description": "Absolute path to the project root directory", "type": "string" }, "context": { "description": "Extract additional context about what should be done to create a ui component/page based on the user's message, search query, and conversation history, files. Don't halucinate and be on point.", "type": "string" }, "message": { "description": "Full users message", "type": "string" }, "searchQuery": { "description": "Generate a search query for 21st.dev (library for searching UI components) to find a UI component that matches the user's message. Must be a two-four words max or phrase", "type": "string" } }, "required": [ "message", "searchQuery", "absolutePathToCurrentFile", "absolutePathToProjectDirectory", "context" ], "type": "object" }
Install Server

Other Tools from 21st.dev Magic AI Agent

Related Tools

    MCP directory API

    We provide all the information about MCP servers via our MCP API.

    curl -X GET 'https://glama.ai/api/mcp/v1/servers/zackbissell/magic-mcp'

    If you have feedback or need assistance with the MCP directory API, please join our Discord server