Skip to main content
Glama
BACH-AI-Tools

21st.dev Magic AI Agent

21st_magic_component_refiner

Redesign and improve React UI components by refining styling, layout, and responsiveness based on specific user feedback and file context.

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
userMessageYesFull user's message about UI refinement
absolutePathToRefiningFileYesAbsolute path to the file that needs to be refined
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.
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. While it states the tool 'improves UI' and 'returns redesigned version,' it lacks details about how the improvement works (e.g., is it AI-generated, template-based, manual?), what permissions or prerequisites are needed, whether changes are destructive or reversible, or any rate limits. For a tool that modifies UI components with no annotation coverage, this is a significant gap in transparency.

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 appropriately concise with two sentences that directly address usage and purpose. The first sentence efficiently covers when to use the tool, and the second explains what it does. There's no wasted text, though it could be slightly more structured (e.g., separating usage and output more clearly).

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?

Given the complexity (a UI refinement tool with 3 parameters, no annotations, and no output schema), the description is moderately complete. It covers the tool's purpose and usage context adequately but lacks behavioral details (e.g., how refinement works, output format beyond 'redesigned version') and doesn't leverage sibling tool context to differentiate alternatives. Without annotations or output schema, the description should do more to compensate, but it meets a minimum viable level.

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%, so the schema already documents all three parameters thoroughly. The description doesn't add any parameter-specific information beyond what's in the schema (e.g., it doesn't clarify the relationship between 'userMessage' and 'context' or provide examples). With high schema coverage, the baseline is 3, as the description doesn't compensate with additional parameter insights.

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

Purpose4/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: 'improves UI of components and returns redesigned version of the component and instructions on how to implement it.' This specifies both the action (improves UI) and the output (redesigned component + implementation instructions). However, it doesn't explicitly differentiate from sibling tools like '21st_magic_component_builder' or '21st_magic_component_inspiration' beyond mentioning it's for refinement rather than building new components.

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 clear context for when to 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 includes specific triggers (commands) and scope limitations (components/molecules, not big pages). However, it doesn't explicitly mention when to use alternatives like the sibling 'builder' or 'inspiration' tools.

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/BACH-AI-Tools/bach-magic-mcp'

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