Skip to main content
Glama

Get Block Metadata

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");
            }
        }
    );
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions fetching metadata from a URL and that it provides metadata for all FlyonUI blocks, but doesn't disclose behavioral traits such as authentication needs, rate limits, error handling, or what 'metadata' includes. This leaves significant gaps for a tool with no annotation coverage.

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

Conciseness3/5

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

The description is three sentences but includes redundancy (e.g., 'Use this tool to retrieve the block metadata' repeats the purpose). It could be more front-loaded and concise by eliminating repetitive phrases, though it's not overly verbose.

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

Completeness2/5

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

Given no annotations and no output schema, the description is incomplete. It doesn't explain what 'metadata' entails, how the URL is used, or the return format. For a tool with complexity in fetching and processing metadata, this lacks sufficient detail to guide an agent effectively.

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

Parameters4/5

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

The input schema has 0 parameters with 100% coverage, so no parameters need documentation. The description adds context by mentioning a URL as the source, which is useful beyond the schema, though it doesn't specify if the URL is a parameter or implied. Baseline is 4 for zero parameters.

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

Purpose3/5

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

The description states the tool fetches block metadata from a URL, which is a clear purpose. However, it doesn't distinguish this from sibling tools like 'get-block-content' or 'get-block-meta-content', making it vague about its specific role within the toolset.

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?

The description says 'Use this tool to retrieve the block metadata,' but provides no guidance on when to use this versus alternatives like 'get-block-content' or 'get-block-meta-content.' It lacks explicit when/when-not instructions or named alternatives.

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