Skip to main content
Glama

get-block-meta-content

Retrieve block metadata content from the FlyonUI MCP server to access UI component information for development workflows.

Instructions

Fetch the content of the block metadata from the FlyonUI MCP server. Use this tool to retrieve the block metadata content.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endpointYes

Implementation Reference

  • The handler function that implements the 'get-block-meta-content' tool. It takes an 'endpoint' parameter, appends '?type=mcp' to it, fetches data using apiClient.get, and returns the JSON response formatted as text content. Errors are caught and rethrown with specific messages.
    async ({ endpoint }) => { try { const url = endpoint + "?type=mcp"; const response = await apiClient.get(url); if (response.status !== 200) { throw new Error(`Failed to fetch block meta content: ${response.status}`); } return { content: [ { type: "text", text: JSON.stringify(response.data, null, 2), } ], }; } catch (error) { console.error("Error fetching block meta content:", error); throw new Error("Failed to fetch block meta content"); } }
  • The input schema for the tool, defining a single required string parameter 'endpoint' using Zod validation.
    inputSchema: { endpoint: z.string() },
  • src/index.ts:142-173 (registration)
    The registration of the 'get-block-meta-content' tool using server.registerTool, specifying the tool name, metadata (title, description), input schema, and the inline handler function.
    server.registerTool( "get-block-meta-content", { title: "Get Block Meta Content", description: "Fetch the content of the block metadata from the FlyonUI MCP server. Use this tool to retrieve the block metadata content.", inputSchema: { endpoint: z.string() }, }, async ({ endpoint }) => { try { const url = endpoint + "?type=mcp"; const response = await apiClient.get(url); if (response.status !== 200) { throw new Error(`Failed to fetch block meta content: ${response.status}`); } return { content: [ { type: "text", text: JSON.stringify(response.data, null, 2), } ], }; } catch (error) { console.error("Error fetching block meta content:", error); throw new Error("Failed to fetch block meta content"); } } );
  • Import of the apiClient helper used in the tool handler for making HTTP GET requests to fetch block meta content.
    import { apiClient } from "./utils/http-client.js";
  • The apiClient object definition, which provides the generic HTTP client methods (including get) used by the tool handler to communicate with the FlyonUI API.
    export const apiClient: HttpClient = { get: createMethod("GET"), post: createMethod("POST"), put: createMethod("PUT"), delete: createMethod("DELETE"), patch: createMethod("PATCH"), };

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