list_all_components
Retrieve all available component names from Korea's government digital design system (KRDS) to browse UI elements for Korean government digital services.
Instructions
모든 KRDS 컴포넌트 이름 목록을 가져옵니다.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/component-search.ts:62-65 (handler)Core handler function that implements the 'list_all_components' tool logic by loading all KRDS components via the loader and returning a sorted list of component names.export async function listComponentNames(loader: KRDSLoader): Promise<string[]> { const allComponents = await loader.loadComponents(); return allComponents.map(c => c.name).sort(); }
- src/index.ts:143-150 (registration)Tool registration in the getTools() method, defining the tool name, description, and empty input schema.{ name: 'list_all_components', description: '모든 KRDS 컴포넌트 이름 목록을 가져옵니다.', inputSchema: { type: 'object', properties: {}, }, },
- src/index.ts:277-283 (handler)Wrapper handler in the MCP server that calls the core listComponentNames function and formats the response as formatted text.private async handleListComponents() { const components = await listComponentNames(this.loader); const text = `KRDS 컴포넌트 목록 (${components.length}개):\n\n${components.map(c => `• ${c}`).join('\n')}`; return { content: [{ type: 'text', text }], };
- src/index.ts:66-67 (handler)Switch case dispatcher that routes calls to the 'list_all_components' tool to its handler method.case 'list_all_components': return await this.handleListComponents();
- src/index.ts:146-149 (schema)Input schema definition for the tool, specifying an empty object (no parameters required).inputSchema: { type: 'object', properties: {}, },