Skip to main content
Glama
mrbkrustamov

@21st-dev/magic

by mrbkrustamov

21st_magic_component_refiner

Refines React UI components based on user feedback and code context, delivering redesigned versions and implementation instructions for targeted changes.

Instructions

"Use this tool when the user requests to re-design/refine/improve current UI component with /ui or /21 commands, or when context is about improving, or refining UI for a React component or molecule (NOT for big pages). This tool improves UI of components and returns redesigned version of the component and instructions on how to implement it."

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contextYesExtract the specific UI elements and aspects that need improvement based on user messages, code, and conversation history. Identify exactly which components (buttons, forms, modals, etc.) the user is referring to and what aspects (styling, layout, responsiveness, etc.) they want to enhance. Do not include generic improvements - focus only on what the user explicitly mentions or what can be reasonably inferred from the available context. If nothing specific is mentioned or you cannot determine what needs improvement, return an empty string.
userMessageYesFull user's message about UI refinement
absolutePathToRefiningFileYesAbsolute path to the file that needs to be refined
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the behavioral burden. It discloses that the tool returns a redesigned version and implementation instructions, implying a non-mutating output. It also sets expectations around scope (components/molecules only, not big pages). It doesn't detail permissions or side effects, but for a UI refinement tool, the key behavior is clearly stated.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the usage condition, and contains zero fluff. Every clause adds value: trigger commands, scope, output, and exclusion.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (3 params, no output schema, no annotations), the description covers the essential aspects: what it does, when to use it, and what it returns. It could elaborate on the structure of the 'instructions' or the exact form of the redesigned version, but it is sufficiently complete for an agent to understand the tool's role among siblings.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with each parameter having a detailed description (e.g., context extraction rules). The tool description adds no additional parameter-level semantics, so the schema already does the heavy lifting. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: to refine/improve existing UI components for React components or molecules, distinguishing it from building new ones (sibling builder). It explicitly mentions the trigger commands (/ui, /21) and the scope limitation (NOT for big pages), making it unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit usage context: when the user requests re-design/refinement of a current UI component or when context is about improving a React component/molecule. It also includes an exclusion (NOT for big pages). However, it doesn't explicitly name alternative tools, relying on the 'current' vs 'new' distinction to differentiate from the builder sibling.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

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/mrbkrustamov/magic_mcp'

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