Skip to main content
Glama

21st_magic_component_refiner

Refine existing React UI components by specifying the file to improve and the elements to enhance. Receive a redesigned component with implementation instructions.

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

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It does mention that the tool returns a redesigned version and implementation instructions, which gives some output behavior. However, it does not disclose whether the tool modifies the file (write), requires specific permissions, or has any side effects. This ambiguity could mislead the agent about the tool's mutability.

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 an explicit usage directive, and every sentence earns its place. It is concise without redundancy, efficiently conveying purpose, usage, and output.

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?

The description covers the tool's purpose, when to use it, and what it returns (redesigned version + instructions), which is essential for a tool with no output schema. It leverages the schema's rich parameter descriptions. However, the lack of side-effect transparency and absence of annotations leave a small gap in complete understanding of the tool's behavior.

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%, and each parameter has a detailed description, especially 'context' which explains what to extract and what to do if nothing specific is mentioned. Since the schema fully documents parameters, the description adds no extra semantics, but the schema already provides sufficient meaning.

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 states a specific verb+resource: 'improves UI of components and returns redesigned version of the component and instructions on how to implement it.' It distinguishes from siblings by specifying it is for refining existing components (not building) and excludes big pages, which aligns with the tool name and differentiates it from 21st_magic_component_builder.

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?

It clearly says when to use: when the user requests to re-design/refine/improve a current UI component with /ui or /21 commands, or when context is about improving/refining a React component/molecule. It also excludes big pages. However, it does not explicitly name alternatives (e.g., 'use builder for new components'), so it lacks full explicit alternative guidance.

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/vparsatwar-git/magic-mcp'

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