Skip to main content
Glama

search_krds_components

Search and filter UI components from Korea's government digital design system using keywords or categories to find specific design elements for government digital services.

Instructions

KRDS 컴포넌트를 검색합니다. 검색어나 카테고리로 필터링할 수 있습니다.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNo검색할 키워드 (예: button, input, modal)
categoryNo컴포넌트 카테고리 (예: Form, Navigation, Layout)

Implementation Reference

  • Core handler function implementing the logic to search KRDS components by query and/or category.
    export async function searchComponents(
      loader: KRDSLoader,
      query?: string,
      category?: string
    ): Promise<KRDSComponent[]> {
      const allComponents = await loader.loadComponents();
      
      let results = allComponents;
      
      // 카테고리 필터
      if (category) {
        results = results.filter(c => 
          c.category.toLowerCase() === category.toLowerCase()
        );
      }
      
      // 검색어 필터
      if (query) {
        const lowerQuery = query.toLowerCase();
        results = results.filter(c => 
          c.name.toLowerCase().includes(lowerQuery) ||
          c.category.toLowerCase().includes(lowerQuery) ||
          (c.description && c.description.toLowerCase().includes(lowerQuery))
        );
      }
      
      return results;
    }
  • src/index.ts:57-58 (registration)
    Tool dispatch registration in the main request handler switch statement.
    case 'search_krds_components':
      return await this.handleSearchComponents(args);
  • Tool registration including name, description, and input schema definition.
    {
      name: 'search_krds_components',
      description: 'KRDS 컴포넌트를 검색합니다. 검색어나 카테고리로 필터링할 수 있습니다.',
      inputSchema: {
        type: 'object',
        properties: {
          query: {
            type: 'string',
            description: '검색할 키워드 (예: button, input, modal)',
          },
          category: {
            type: 'string',
            description: '컴포넌트 카테고리 (예: Form, Navigation, Layout)',
          },
        },
      },
    },
  • Wrapper handler that calls the core searchComponents and formats the response for MCP.
    private async handleSearchComponents(args: any) {
      const results = await searchComponents(this.loader, args?.query, args?.category);
      
      const text = results.length > 0
        ? `찾은 컴포넌트 (${results.length}개):\n\n` +
          results.map(c => 
            `📦 ${c.name}\n` +
            `   카테고리: ${c.category}\n` +
            `   설명: ${c.description || '설명 없음'}\n` +
            `   파일: ${c.fileName}`
          ).join('\n\n')
        : '검색 결과가 없습니다.';
      
      return {
        content: [{ type: 'text', text }],
      };
    }
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 filtering capabilities but doesn't disclose behavioral traits such as pagination, rate limits, authentication needs, or what the output looks like (e.g., list of components with details). For a search tool with zero annotation coverage, this is a significant gap.

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

Conciseness4/5

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

The description is concise with two sentences that directly state the tool's function and filtering options, with no wasted words. However, it could be more front-loaded by immediately distinguishing from siblings, but it's efficiently structured overall.

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 complexity of a search tool with no annotations and no output schema, the description is incomplete. It lacks details on output format, error handling, or how results are returned (e.g., sorted, limited). With siblings offering similar functionalities, more context is needed to guide proper use.

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 clear descriptions for both parameters (query and category), including examples. The description adds minimal value by repeating that filtering is possible but doesn't provide additional semantics beyond what the schema already documents, meeting the baseline for high coverage.

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

Purpose3/5

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

The description states the tool 'searches KRDS components' and mentions filtering by search term or category, which provides a basic purpose. However, it doesn't specify what KRDS components are or how this differs from sibling tools like 'list_all_components' or 'search_design_tokens', leaving the scope vague.

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. With siblings like 'list_all_components' (likely unfiltered listing) and 'search_design_tokens' (different resource), the description fails to clarify use cases, exclusions, or prerequisites, offering only basic functionality without context.

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/re-rank/UIUX-MCP'

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