Skip to main content
Glama

list_components

Retrieve available Reacticx React Native components, optionally filtered by category such as shaders, texts, or micro-interactions, to facilitate component discovery and integration.

Instructions

List all available Reacticx components. Optionally filter by category: shaders, texts, micro-interactions, components, templates.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryNoFilter by category: shaders, texts, micro-interactions, components, templates

Implementation Reference

  • Main handler function that executes the list_components tool logic. It optionally filters by category using getComponentsByCategory or returns all components from COMPONENT_REGISTRY, then groups and formats them into a readable Markdown output with component names, slugs, descriptions, and dependencies.
    async ({ category }) => {
      let results =
        category && category.trim()
          ? getComponentsByCategory(category.trim())
          : COMPONENT_REGISTRY;
    
      if (results.length === 0) {
        return {
          content: [
            {
              type: "text" as const,
              text: `No components found for category "${category}". Available categories: ${CATEGORIES.join(", ")}`,
            },
          ],
        };
      }
    
      const grouped = new Map<string, typeof results>();
      for (const comp of results) {
        const cat = comp.category;
        if (!grouped.has(cat)) grouped.set(cat, []);
        grouped.get(cat)!.push(comp);
      }
    
      let output = `# Reacticx Components (${results.length} total)\n\n`;
      output += `Install any component: \`bunx --bun reacticx add <component-name>\`\n\n`;
    
      for (const [cat, comps] of grouped) {
        output += `## ${cat.charAt(0).toUpperCase() + cat.slice(1)} (${comps.length})\n\n`;
        for (const comp of comps) {
          const deps =
            comp.dependencies.length > 0
              ? ` — deps: ${comp.dependencies.join(", ")}`
              : "";
          output += `- **${comp.name}** (\`${comp.slug}\`): ${comp.description}${deps}\n`;
        }
        output += "\n";
      }
    
      return {
        content: [{ type: "text" as const, text: output }],
      };
    }
  • Zod schema definition for the list_components tool's input parameters, defining an optional 'category' field that accepts strings from the valid categories: shaders, texts, micro-interactions, components, templates.
    category: z
      .string()
      .optional()
      .describe(
        "Filter by category: shaders, texts, micro-interactions, components, templates"
      ),
  • src/index.ts:20-74 (registration)
    Tool registration using server.tool() that registers 'list_components' with the MCP server, including its description, input schema, and async handler function.
    server.tool(
      "list_components",
      "List all available Reacticx components. Optionally filter by category: shaders, texts, micro-interactions, components, templates.",
      {
        category: z
          .string()
          .optional()
          .describe(
            "Filter by category: shaders, texts, micro-interactions, components, templates"
          ),
      },
      async ({ category }) => {
        let results =
          category && category.trim()
            ? getComponentsByCategory(category.trim())
            : COMPONENT_REGISTRY;
    
        if (results.length === 0) {
          return {
            content: [
              {
                type: "text" as const,
                text: `No components found for category "${category}". Available categories: ${CATEGORIES.join(", ")}`,
              },
            ],
          };
        }
    
        const grouped = new Map<string, typeof results>();
        for (const comp of results) {
          const cat = comp.category;
          if (!grouped.has(cat)) grouped.set(cat, []);
          grouped.get(cat)!.push(comp);
        }
    
        let output = `# Reacticx Components (${results.length} total)\n\n`;
        output += `Install any component: \`bunx --bun reacticx add <component-name>\`\n\n`;
    
        for (const [cat, comps] of grouped) {
          output += `## ${cat.charAt(0).toUpperCase() + cat.slice(1)} (${comps.length})\n\n`;
          for (const comp of comps) {
            const deps =
              comp.dependencies.length > 0
                ? ` — deps: ${comp.dependencies.join(", ")}`
                : "";
            output += `- **${comp.name}** (\`${comp.slug}\`): ${comp.description}${deps}\n`;
          }
          output += "\n";
        }
    
        return {
          content: [{ type: "text" as const, text: output }],
        };
      }
    );
  • Helper function getComponentsByCategory that filters the COMPONENT_REGISTRY to return only components matching the specified category (case-insensitive comparison). Used by list_components handler when a category filter is provided.
    export function getComponentsByCategory(
      category: string
    ): ComponentInfo[] {
      return COMPONENT_REGISTRY.filter(
        (c) => c.category.toLowerCase() === category.toLowerCase()
      );
    }
  • Type definition for ComponentInfo interface that defines the shape of component data including name, slug, category, description, and dependencies array. This schema is used throughout the registry and returned by list_components.
    export interface ComponentInfo {
      name: string;
      slug: string;
      category: string;
      description: string;
      dependencies: string[];
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions listing and filtering but doesn't disclose behavioral traits such as pagination, rate limits, authentication needs, or what 'list all' entails (e.g., completeness, ordering). This leaves significant gaps for an agent.

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 appropriately sized and front-loaded, consisting of one efficient sentence that states the core purpose and optional filtering. There is zero waste, making it highly concise and well-structured.

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 return values, error handling, or other contextual details needed for a list operation. This is inadequate for a tool with no structured support.

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?

Schema description coverage is 100%, so the schema already documents the 'category' parameter with its description. The description adds no additional meaning beyond what the schema provides, such as syntax details or examples, resulting in the baseline score of 3.

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 the resource 'Reacticx components', making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like 'search_components' or 'get_component_docs', which prevents a perfect score.

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

Usage Guidelines3/5

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

The description implies usage by mentioning optional filtering by category, but it doesn't provide explicit guidance on when to use this tool versus alternatives like 'search_components'. No exclusions or clear context for tool selection are stated.

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/igorfelipeduca/reacticx-mcp'

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