get-refine-instructions
Generate precise instructions for refining UI components in FlyonUI MCP Server. Enhance existing blocks with tailored guidance for React, Next.js, Vue, and Svelte frameworks.
Instructions
Get instructions for refining FlyonUI blocks. This tool provides instructions for refining existing FlyonUI blocks. Use this tool when the user requests to refine an existing component. mentions /refine-flyonui or /rui.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:84-106 (handler)Handler function that fetches the refine instructions from the API endpoint `/instructions?path=refine-ui.md` using the apiClient, formats the response as JSON text content, and handles errors.async () => { try { const url = `/instructions?path=refine-ui.md`; const response = await apiClient.get(url); if (response.status !== 200) { throw new Error(`HTTP error! status: ${response.status}`); } return { content: [ { type: "text", text: JSON.stringify(response.data, null, 2), } ], }; } catch (error) { console.error("Error fetching block metadata:", error); throw new Error("Failed to fetch block metadata"); } }
- src/index.ts:78-107 (registration)Registration of the 'get-refine-instructions' tool with server.registerTool, providing title and description, and the inline handler function.server.registerTool( "get-refine-instructions", { title: "Get Instructions for refining flyonui blocks/code/component or page.", description: "Get instructions for refining FlyonUI blocks. This tool provides instructions for refining existing FlyonUI blocks. Use this tool when the user requests to refine an existing component. mentions /refine-flyonui or /rui.", }, async () => { try { const url = `/instructions?path=refine-ui.md`; const response = await apiClient.get(url); if (response.status !== 200) { throw new Error(`HTTP error! status: ${response.status}`); } return { content: [ { type: "text", text: JSON.stringify(response.data, null, 2), } ], }; } catch (error) { console.error("Error fetching block metadata:", error); throw new Error("Failed to fetch block metadata"); } } );