get-blocks-metadata
Retrieve metadata for all FlyonUI UI blocks to identify available components for React, Next.js, Vue, and Svelte projects.
Instructions
Fetch the metadata of a block from a given URL. Use this tool to retrieve the block metadata. This will provide the metadata of all the FlyonUI blocks available for use.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:116-138 (handler)The handler function for the 'get-blocks-metadata' tool. It makes an HTTP GET request to `/instructions?path=block_metadata.json` using the apiClient, formats the response data as JSON text content, and handles errors.async () => { try { const url = `/instructions?path=block_metadata.json`; const response = await apiClient.get(url); if (response.status !== 200) { throw new Error(`Failed to fetch block metadata: ${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:110-139 (registration)Registration of the 'get-blocks-metadata' tool via McpServer.registerTool, defining its title, description (no inputSchema), and inline handler function.server.registerTool( "get-blocks-metadata", { title: "Get Block Metadata", description: "Fetch the metadata of a block from a given URL. Use this tool to retrieve the block metadata. This will provide the metadata of all the FlyonUI blocks available for use.", }, async () => { try { const url = `/instructions?path=block_metadata.json`; const response = await apiClient.get(url); if (response.status !== 200) { throw new Error(`Failed to fetch block metadata: ${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"); } } );