Skip to main content
Glama

Get Block Meta Content

get-block-meta-content

Fetch block metadata content from the FlyonUI MCP server to retrieve detailed information about UI components for Tailwind-based development.

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

  • src/index.ts:141-173 (registration)
    Registration of the 'get-block-meta-content' tool using server.registerTool(), with inputSchema requiring an 'endpoint' string parameter.
    // A tool to get the metadata of the block.
    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");
            }
        }
    );
  • Handler function for the tool that takes an 'endpoint' parameter, appends '?type=mcp', calls apiClient.get() to fetch block meta content from the FlyonUI MCP server, and returns the JSON response as text.
    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");
        }
    }
  • Schema definition for the 'get-block-meta-content' tool: title 'Get Block Meta Content', description, and inputSchema with a required 'endpoint' string parameter validated by Zod.
    {
        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() },
    },
  • The apiClient used by the handler to make HTTP GET requests, configured with BASE_URL 'https://flyonui.com/api/mcp' and optional x-license-key header.
    import { config } from "./config.js";
    
    const API_KEY =
        config.apiKey || process.env.API_KEY;
    
    export const BASE_URL = "https://flyonui.com/api/mcp";
    
    type HttpMethod = "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
    
    interface HttpClient {
        get<T>(
            endpoint: string,
            options?: RequestInit
        ): Promise<{ status: number; data: T }>;
        post<T>(
            endpoint: string,
            data?: unknown,
            options?: RequestInit
        ): Promise<{ status: number; data: T }>;
        put<T>(
            endpoint: string,
            data?: unknown,
            options?: RequestInit
        ): Promise<{ status: number; data: T }>;
        delete<T>(
            endpoint: string,
            data?: unknown,
            options?: RequestInit
        ): Promise<{ status: number; data: T }>;
        patch<T>(
            endpoint: string,
            data?: unknown,
            options?: RequestInit
        ): Promise<{ status: number; data: T }>;
    }
    
    const createMethod = (method: HttpMethod) => {
        return async <T>(
            endpoint: string,
            data?: unknown,
            options: RequestInit = {}
        ) => {
            const headers: HeadersInit = {
                "Content-Type": "application/json",
                ...(API_KEY ? { "x-license-key": API_KEY } : {}),
                ...options.headers,
            };
    
            const response = await fetch(`${BASE_URL}${endpoint}`, {
                ...options,
                method,
                headers,
                ...(data ? { body: JSON.stringify(data) } : {}),
            });
    
            return { status: response.status, data: (await response.json()) as T };
        };
    };
    
    export const apiClient: HttpClient = {
        get: createMethod("GET"),
        post: createMethod("POST"),
        put: createMethod("PUT"),
        delete: createMethod("DELETE"),
        patch: createMethod("PATCH"),
    };
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, and the description only states 'Fetch', implying read-only, but does not disclose any behavioral traits such as side effects, required permissions, rate limits, or response structure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely short (two sentences), but it lacks necessary information, making it under-specified rather than concise. Every sentence is vague.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and a single undocumented parameter, the description fails to provide adequate context for an agent to use the tool effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has a single required parameter 'endpoint' with no description, and the description provides zero information about its meaning, format, or valid values (0% schema description coverage).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses verbs 'Fetch' and 'retrieve' with the resource 'block metadata content', but it doesn't clearly differentiate from sibling tools like 'get-block-content' or 'get-blocks-metadata', leaving ambiguity about what 'metadata content' specifically means.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. The description lacks any context about prerequisites or exclusions, leaving the agent without decision criteria.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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