Skip to main content
Glama

list_components

Browse available React components and filter by category to find UI elements for building interfaces with its-just-ui.

Instructions

List available its-just-ui components and their categories

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryNoFilter components by category

Implementation Reference

  • The tool handler for 'list_components' that parses the input schema, calls componentRegistry.listComponents(category), and returns the result as a JSON string in the tool response format.
    case "list_components": {
      const { category } = ListComponentsSchema.parse(args);
      const components = componentRegistry.listComponents(category);
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(components, null, 2),
          },
        ],
      };
    }
  • Zod schema defining the input for the 'list_components' tool: optional 'category' enum to filter components.
    const ListComponentsSchema = z.object({
      category: z
        .enum([
          "all",
          "core",
          "navigation",
          "form",
          "data-display",
          "feedback",
          "layout",
        ])
        .optional()
        .describe("Filter components by category"),
    });
  • src/index.ts:159-180 (registration)
    Registration of the 'list_components' tool in the ListToolsRequestHandler response, providing name, description, and input schema.
      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",
          },
        },
      },
    },
  • Core logic implementation in ComponentRegistry.listComponents that iterates over registered components, filters by optional category, and groups them by category name returning Record<string, string[]>.
    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;
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool lists components and categories but doesn't mention whether this is a read-only operation, how results are formatted (e.g., pagination, sorting), or any rate limits or authentication needs. This leaves significant gaps for a tool that likely returns structured data.

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

Conciseness5/5

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

The description is a single, efficient sentence that directly states the tool's purpose with zero wasted words. It is appropriately sized and front-loaded, making it easy to parse quickly.

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 the lack of annotations and output schema, the description is incomplete. It doesn't explain what the output looks like (e.g., list format, included fields like component names or descriptions), which is critical for a listing tool. This leaves the agent with insufficient context to use the tool effectively.

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

Parameters3/5

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

The input schema has 100% description coverage, with the single parameter 'category' fully documented via its enum and description. The description adds no additional parameter details beyond what the schema provides, so it meets the baseline of 3 for high schema coverage without compensating value.

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

Purpose4/5

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

The description clearly states the verb ('List') and resource ('its-just-ui components and their categories'), making the purpose immediately understandable. It doesn't explicitly differentiate from sibling tools like 'get_component_docs' or 'generate_component', but the core action is well-defined.

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?

No guidance is provided on when to use this tool versus alternatives like 'get_component_docs' for detailed documentation or 'generate_component' for creating components. The description implies usage for listing components but offers no context on prerequisites, timing, or exclusions.

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/its-just-ui/its-just-mcp'

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