Skip to main content
Glama

components-filter

Filter and retrieve shadcn/ui components with Tailwind CSS based on specific requirements. Simplify UI development by processing structured input to identify relevant components.

Instructions

filter components with shadcn/ui components and tailwindcss, Use this tool when mentions /filter

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageYesrequirement json from requirement-structuring tool

Implementation Reference

  • Registration of the 'components-filter' tool, including name, description, schema, and handler.
    server.addTool({ name: "components-filter", description: "filter components with shadcn/ui components and tailwindcss, Use this tool when mentions /filter", parameters: z.object({ message: z.string().describe("requirement json from requirement-structuring tool"), }), execute: async (params) => { try { // 将筛选任务和数据传给 IDE 的 AI 处理 const filteringPrompt = `${getFilterComponentsPrompt(params.message)}\nAfter outputting the json, call the component-builder tool`; return { content: [ { type: "text", text: filteringPrompt, }, ], }; } catch (error) { console.error("Error executing tool:", error); throw error; } }, });
  • Zod schema defining the input parameter 'message' for the tool.
    parameters: z.object({ message: z.string().describe("requirement json from requirement-structuring tool"), }),
  • Handler function that generates a prompt using getFilterComponentsPrompt and returns it as text content for AI processing.
    execute: async (params) => { try { // 将筛选任务和数据传给 IDE 的 AI 处理 const filteringPrompt = `${getFilterComponentsPrompt(params.message)}\nAfter outputting the json, call the component-builder tool`; return { content: [ { type: "text", text: filteringPrompt, }, ], }; } catch (error) { console.error("Error executing tool:", error); throw error; } },

Other Tools

Related 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/HelloGGX/shadcn-vue-mcp'

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