get-block-meta-content
Retrieve block metadata content from the FlyonUI MCP server. This tool extracts metadata by accepting an endpoint input, enabling developers to access and utilize block-specific data efficiently.
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
| Name | Required | Description | Default |
|---|---|---|---|
| endpoint | Yes |
Implementation Reference
- src/index.ts:149-172 (handler)The handler function for the 'get-block-meta-content' tool. It takes an 'endpoint' parameter, constructs the URL by appending '?type=mcp', performs an HTTP GET request using apiClient, and returns the response data as a structured content object with JSON-stringified text. Errors are caught and rethrown with descriptive 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"); } }
- src/index.ts:147-147 (schema)The input schema for the tool, defining a single required string parameter 'endpoint' validated using Zod.inputSchema: { endpoint: z.string() },
- src/index.ts:142-173 (registration)The registration of the 'get-block-meta-content' tool using McpServer's registerTool method, including title, description, input schema, and the 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"); } } );