Skip to main content
Glama

refine_frontend

Refine existing HTML components by describing desired changes. Apply modifications to button colors, layout, or responsiveness without redesigning from scratch.

Instructions

Refine an existing component design based on feedback.

Use this tool to iterate on a design without starting from scratch. Send the previous HTML and describe the changes you want. All content will be generated in Turkish.

Args: previous_html: The existing HTML code to refine. This should be the complete HTML from a previous design_frontend or design_page call. modifications: Natural language description of desired changes. Examples: - "Buton rengini maviden yeşile çevir" - "Header'ı daha kompakt yap" - "Dark mode desteği ekle" - "Mobil responsive sorunlarını düzelt" - "Hover efektlerini daha belirgin yap" project_context: Optional project context for consistency.

Returns: Dict containing: - component_id: Identifier for the refined component - html: The modified HTML with TailwindCSS - changes_made: Summary of changes applied - design_notes: Explanation of modifications - model_used: Always gemini-3-pro-preview

Example: refine_frontend( previous_html='Gönder', modifications="Buton boyutunu büyüt ve hover efekti ekle" )

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
auto_fixNo
use_trifectaNo
modificationsYes
previous_htmlYes
project_contextNo
inject_js_fallbacksNo
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses that all content is generated in Turkish, that the model is always gemini-3-pro-preview, and expects previous HTML. However, it does not discuss potential side effects or limitations, such as what happens if the input HTML is invalid.

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 well-structured with a clear intent, usage guidance, parameter descriptions with examples, and return value details. Every section is valuable and there is no wasted text.

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 has 6 parameters (2 required) and no output schema, the description covers core functionality well, including return fields. However, missing documentation on three boolean parameters (auto_fix, use_trifecta, inject_js_fallbacks) prevents a perfect score.

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 coverage is 0% per context signals. The description adds meaning for three parameters (previous_html, modifications, project_context) with examples, but three parameters (auto_fix, use_trifecta, inject_js_fallbacks) are undocumented. This partial coverage warrants a score of 3.

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 uses the verb 'Refine' and specifies the resource as 'an existing component design based on feedback.' This clearly states the tool's purpose and differentiates it from sibling tools like design_frontend which create new designs.

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?

Explicitly states 'Use this tool to iterate on a design without starting from scratch,' providing clear guidance on when to use it. It implies that for new designs, other tools like design_frontend should be used.

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/archolet/claude-gemini-bridge'

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