get-refine-instructions
Provides instructions for refining existing FlyonUI UI components when users request to modify or improve blocks, supporting frameworks like React, Next.js, Vue, and Svelte.
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:78-107 (registration)Registers the 'get-refine-instructions' tool with server.registerTool, including title, 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"); } } );
- src/index.ts:84-106 (handler)Inline handler function for the tool that performs an HTTP GET request to `/instructions?path=refine-ui.md` using apiClient, returns the response data as formatted JSON text content, and handles errors appropriately.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"); } }