list_components
Discover and filter its-just-ui React components by category (core, navigation, form, etc.) to streamline component selection and integration for your projects.
Instructions
List available its-just-ui components and their categories
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| category | No | Filter components by category |
Implementation Reference
- src/index.ts:375-386 (handler)The main handler for the 'list_components' MCP tool. Parses the input arguments using the schema, calls componentRegistry.listComponents(), and returns the result as formatted JSON text content.case "list_components": { const { category } = ListComponentsSchema.parse(args); const components = componentRegistry.listComponents(category); return { content: [ { type: "text", text: JSON.stringify(components, null, 2), }, ], }; }
- src/index.ts:44-57 (schema)Zod schema defining the input validation for the 'list_components' tool, specifying an optional 'category' enum filter.const ListComponentsSchema = z.object({ category: z .enum([ "all", "core", "navigation", "form", "data-display", "feedback", "layout", ]) .optional() .describe("Filter components by category"), });
- src/index.ts:158-180 (registration)Tool registration in the ListTools response, defining name, description, and input schema for 'list_components'.{ name: "list_components", description: "List available its-just-ui components and their categories", inputSchema: { type: "object", properties: { category: { type: "string", enum: [ "all", "core", "navigation", "form", "data-display", "feedback", "layout", ], description: "Filter components by category", }, }, }, },
- src/components/registry.ts:484-497 (helper)Core helper method on ComponentRegistry that lists components grouped by category, filtering optionally by the provided category.listComponents(category?: string): Record<string, string[]> { const result: Record<string, string[]> = {}; for (const [name, info] of this.components) { if (!category || category === "all" || info.category === category) { if (!result[info.category]) { result[info.category] = []; } result[info.category].push(name); } } return result; }