Skip to main content
Glama

Get Instructions for refining flyonui blocks/code/component or page.

get-refine-instructions

Get step-by-step instructions to refine existing FlyonUI components in your IDE. Use when you need to modify or improve a UI block for React, Vue, Svelte, or Next.js.

Instructions

Get instructions for refining FlyonUI blocks. This tool provides instructions for refining existing FlyonUI blocks. Use this tool when the user requests to refine an existing component. mentions /refine-flyonui or /rui.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/index.ts:78-107 (registration)
    Registration of the "get-refine-instructions" tool via server.registerTool(). The registered name is "get-refine-instructions" with a title and description for refining FlyonUI blocks.
    server.registerTool(
        "get-refine-instructions",
        {
            title: "Get Instructions for refining flyonui blocks/code/component or page.",
            description: "Get instructions for refining FlyonUI blocks. This tool provides instructions for refining existing FlyonUI blocks. Use this tool when the user requests to refine an existing component. mentions /refine-flyonui or /rui.",
        },
        async () => {
            try {
                const url = `/instructions?path=refine-ui.md`;
                const response = await apiClient.get(url);
    
                if (response.status !== 200) {
                    throw new Error(`HTTP error! status: ${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");
            }
        }
    );
  • Handler function for the "get-refine-instructions" tool. It makes a GET request to `/instructions?path=refine-ui.md` via the apiClient and returns the response data as text content. On error, it throws a descriptive error.
    async () => {
        try {
            const url = `/instructions?path=refine-ui.md`;
            const response = await apiClient.get(url);
    
            if (response.status !== 200) {
                throw new Error(`HTTP error! status: ${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");
        }
    }
  • Schema definition for the "get-refine-instructions" tool. It has a title and description but no inputSchema (no required parameters), meaning it takes no arguments.
    {
        title: "Get Instructions for refining flyonui blocks/code/component or page.",
        description: "Get instructions for refining FlyonUI blocks. This tool provides instructions for refining existing FlyonUI blocks. Use this tool when the user requests to refine an existing component. mentions /refine-flyonui or /rui.",
    },
  • The apiClient.get() helper used by the handler. It creates HTTP methods with authentication headers (including x-license-key), and makes requests to the BASE_URL (https://flyonui.com/api/mcp).
    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"),
    };
Behavior3/5

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

No annotations provided, so description carries full burden. It states its function but doesn't disclose details like return format or constraints, though it's a simple query tool.

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

Conciseness4/5

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

Three sentences with front-loaded purpose, but second sentence is somewhat redundant. Overall concise and well-structured.

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

Completeness4/5

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

For a simple tool with no parameters or output schema, description covers purpose, usage context, and trigger phrases. Could mention return type but not essential.

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?

No parameters in schema, so description doesn't need to add param info. It appropriately lacks param details.

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

Purpose5/5

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

Clearly states it provides instructions for refining FlyonUI blocks, and distinguishes from siblings like get-create-instructions by specifying 'refine an existing component'.

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

Usage Guidelines5/5

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

Explicitly says to use when user requests to refine an existing component, and gives trigger mentions /refine-flyonui or /rui, providing clear context and alternative.

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