get-create-instructions
Generate step-by-step instructions for creating FlyonUI blocks using existing components. Ideal for developers building new UI elements in React, Next.js, Vue, or Svelte directly in their IDE.
Instructions
Get instructions for creating FlyonUI blocks using existing blocks. This tool provides instructions for creating new FlyonUI blocks using existing blocks. Use this tool when the user requests to generate a new component. mentions /create-flyonui or /cui. Strictly follow the steps one by one to ensure successful code generation.Retrieves Instructions for IDE agent to follow for creating/generating/updating FlyonUI blocks.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:20-42 (handler)The handler function that executes the logic for the 'get-create-instructions' tool. It makes an HTTP GET request to `/instructions?path=create-ui.md` using the apiClient, stringifies the response data as JSON, and returns it in the expected MCP format. Errors are handled by throwing descriptive errors.async () => { try { const url = `/instructions?path=create-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:14-43 (registration)The registration of the 'get-create-instructions' tool on the MCP server, specifying the tool name, title, description, and attaching the handler function.server.registerTool( "get-create-instructions", { title: "Get Instructions for FlyonUI.", description: "Get instructions for creating FlyonUI blocks using existing blocks. This tool provides instructions for creating new FlyonUI blocks using existing blocks. Use this tool when the user requests to generate a new component. mentions /create-flyonui or /cui. Strictly follow the steps one by one to ensure successful code generation.Retrieves Instructions for IDE agent to follow for creating/generating/updating FlyonUI blocks.", }, async () => { try { const url = `/instructions?path=create-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"); } } );