Skip to main content
Glama

search_components

Find React Native components in Reacticx library by searching names, descriptions, and categories to identify suitable UI elements for your project.

Instructions

Search Reacticx components by keyword. Searches component names, descriptions, and categories.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query (e.g. 'carousel', 'animation', 'slider', 'loader')

Implementation Reference

  • Core searchComponents handler function that filters COMPONENT_REGISTRY based on query against name, slug, description, and category fields (case-insensitive)
    export function searchComponents(query: string): ComponentInfo[] {
      const q = query.toLowerCase();
      return COMPONENT_REGISTRY.filter(
        (c) =>
          c.name.toLowerCase().includes(q) ||
          c.slug.toLowerCase().includes(q) ||
          c.description.toLowerCase().includes(q) ||
          c.category.toLowerCase().includes(q)
      );
    }
  • src/index.ts:148-186 (registration)
    MCP tool registration for 'search_components' with Zod schema for query parameter, handling results formatting and empty results
    server.tool(
      "search_components",
      "Search Reacticx components by keyword. Searches component names, descriptions, and categories.",
      {
        query: z
          .string()
          .describe(
            "Search query (e.g. 'carousel', 'animation', 'slider', 'loader')"
          ),
      },
      async ({ query }) => {
        const results = searchComponents(query);
    
        if (results.length === 0) {
          return {
            content: [
              {
                type: "text" as const,
                text: `No components found matching "${query}". Try a different keyword.`,
              },
            ],
          };
        }
    
        let output = `# Search Results for "${query}" (${results.length} matches)\n\n`;
    
        for (const comp of results) {
          const deps =
            comp.dependencies.length > 0
              ? `\n  Dependencies: ${comp.dependencies.join(", ")}`
              : "";
          output += `- **${comp.name}** (\`${comp.slug}\`) [${comp.category}]\n  ${comp.description}${deps}\n  Install: \`bunx --bun reacticx add ${comp.slug}\`\n\n`;
        }
    
        return {
          content: [{ type: "text" as const, text: output }],
        };
      }
    );
  • ComponentInfo interface defining the type structure for component data returned by searchComponents
    export interface ComponentInfo {
      name: string;
      slug: string;
      category: string;
      description: string;
      dependencies: string[];
    }
  • Zod schema validation for the query parameter of search_components tool
      query: z
        .string()
        .describe(
          "Search query (e.g. 'carousel', 'animation', 'slider', 'loader')"
        ),
    },
Behavior2/5

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

No annotations are provided, so the description carries full burden. It describes the search scope (names, descriptions, categories) but lacks critical behavioral details: it doesn't mention if the search is case-sensitive, how results are sorted/limited, whether it supports partial matches, or what the output format looks like. For a search tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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 extremely concise (two sentences) and front-loaded with the core purpose. Every word earns its place: the first sentence states the action and resource, the second clarifies the search scope. No redundant or vague language is present.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (search operation with one parameter), no annotations, and no output schema, the description is minimally adequate. It covers the basic purpose and search fields but lacks details on behavioral traits, output format, and usage distinctions from siblings. For a search tool, this leaves the agent with incomplete guidance on how to interpret results or choose between similar tools.

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%, with the single parameter 'query' well-documented in the schema (including examples). The description adds minimal value beyond the schema, only reinforcing that it's a keyword search. Since the schema already provides comprehensive parameter documentation, the baseline score of 3 is appropriate.

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 ('Search') and resource ('Reacticx components'), specifying what fields are searched (names, descriptions, categories). It distinguishes from 'list_components' by indicating a keyword-based search rather than listing all components. However, it doesn't explicitly differentiate from other siblings like 'get_component_docs' or 'get_dependencies'.

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 context (searching by keyword across multiple fields) but doesn't explicitly state when to use this tool versus alternatives. For example, it doesn't clarify when to use 'search_components' versus 'list_components' (which might return all components without filtering) or 'get_component_docs' (which might retrieve documentation for a specific component). No exclusions or prerequisites are mentioned.

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