Documentation
¶
Index ¶
Constants ¶
View Source
const ( MagicUIRegistryURL = "https://raw.githubusercontent.com/magicuidesign/magicui/main/registry.json" MagicUIDocsURL = "https://magicui.design" MagicUIGitHubURL = "https://github.com/magicuidesign/magicui" )
Constants for cache keys and TTLs
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheEntry ¶
CacheEntry represents a cached value with timestamp
type ComponentInfo ¶
type ComponentInfo struct {
Name string `json:"name"`
Title string `json:"title"`
Description string `json:"description"`
Dependencies []string `json:"dependencies,omitempty"`
Files []File `json:"files,omitempty"`
}
ComponentInfo holds details for a Magic UI component
type File ¶
type File struct {
Path string `json:"path"`
Type string `json:"type"`
Target string `json:"target"`
}
File represents a component file from the registry
type MagicUITool ¶
type MagicUITool struct{}
MagicUITool provides access to Magic UI component library
func (*MagicUITool) Definition ¶
func (t *MagicUITool) Definition() mcp.Tool
Definition returns the tool's definition for MCP registration
func (*MagicUITool) Execute ¶
func (t *MagicUITool) Execute(ctx context.Context, logger *logrus.Logger, cache *sync.Map, args map[string]any) (*mcp.CallToolResult, error)
Execute executes the Magic UI tool
func (*MagicUITool) ProvideExtendedInfo ¶
func (t *MagicUITool) ProvideExtendedInfo() *tools.ExtendedHelp
ProvideExtendedInfo provides detailed usage information for the Magic UI tool
type Registry ¶
type Registry struct {
Name string `json:"name"`
Homepage string `json:"homepage"`
Items []RegistryItem `json:"items"`
}
Registry represents the Magic UI registry structure
type RegistryItem ¶
type RegistryItem struct {
Name string `json:"name"`
Type string `json:"type"`
Title string `json:"title,omitempty"`
Description string `json:"description,omitempty"`
Dependencies []string `json:"dependencies,omitempty"`
Files []File `json:"files,omitempty"`
}
RegistryItem represents a single item in the Magic UI registry
Click to show internal directories.
Click to hide internal directories.