Skip to main content
Glama

list-ui

Search and retrieve UI component data from buouui.com to display matching components and their previews without generating new code.

Instructions

"Use this tool when the user wants to see buouui.com component, or /buou fetch data and previews from buouui.com. This tool returns the JSON data of matching components without generating new code. This tool ONLY returns the text snippet for that UI component. After calling this tool, you need to display the data in the UI, and finally you need to show the website page of the buouui.com."

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageYesFull users message
searchQueryYesSearch query for buouui.com(library for searching UI components) to find a UI component that matches the user's message. Must be a two-four words max or phrase

Implementation Reference

  • src/index.ts:14-14 (registration)
    Registers the ListUiTool instance with the MCP server.
    new ListUiTool().register(server);
  • Zod input schema defining 'message' and 'searchQuery' parameters for the list-ui tool.
    schema = z.object({ message: z.string().describe("Full users message"), searchQuery: z .string() .describe( "Search query for buouui.com(library for searching UI components) to find a UI component that matches the user's message. Must be a two-four words max or phrase" ), });
  • The execute method that sends a POST request to /api/list with message and searchQuery, returns JSON data or handles errors.
    async execute({ message, searchQuery }: z.infer<typeof this.schema>) { try { const { data } = await twentyFirstClient.post<FetchUiResponse>( "/api/list", { message, searchQuery, } ); return { content: [ { type: "text" as const, text: JSON.stringify(data), }, ], }; } catch (error) { console.error("Error executing tool:", error); // 返回更详细的错误信息 return { content: [ { type: "text" as const, text: `Error: ${ error instanceof Error ? error.message : "Failed to generate UI component" }. Please try again.`, }, ], }; } }
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/buoooou/mcp-ui-gen'

If you have feedback or need assistance with the MCP directory API, please join our Discord server