Skip to main content
Glama

21st_magic_component_refiner

Refine and improve React UI components by providing redesigned versions and implementation instructions. Use for component-level enhancements based on natural language requests.

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
Behavior2/5

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

No annotations provided, so the description must disclose behavioral traits. It states it 'returns redesigned version and instructions' but does not clarify whether the tool modifies files directly, requires write access, or has any side effects. The phrase 'improves UI' is ambiguous regarding automation level.

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

Conciseness4/5

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

The description is concise, with two main clauses front-loading the usage condition and purpose. It wastes no words but could be slightly more structured (e.g., separating usage from behavior). Still, it is efficient for its length.

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

Completeness3/5

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

Without an output schema or annotations, the description partially covers the output (returns redesigned version and instructions) but lacks details on format or how the tool interacts with files. It adequately differentiates from sibling tools but leaves some behavioral gaps.

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?

The input schema has 100% coverage with detailed descriptions for all three parameters. The tool description does not add extra semantics beyond the schema, so the baseline score of 3 is appropriate. The description's usage context does not directly elaborate on parameter usage.

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 explicitly states the tool refines/improves existing UI components, specifically React components or molecules (not big pages), and distinguishes it from building new components or inspiration. It uses specific verbs like 're-design/refine/improve' and names the resource clearly.

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

Usage Guidelines5/5

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

The description provides explicit guidance: 'Use this tool when the user requests to re-design/refine/improve current UI component with /ui or /21 commands'. It also clarifies it is for React components/molecules, excluding big pages, and implicitly contrasts with sibling tools like the builder (for new components).

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/poojitha2136/MAGIC-MCP'

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