Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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"); } } );

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/themeselection/flyonui-mcp'

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