Skip to main content
Glama

get_krds_resources

Retrieve file paths and usage instructions for KRDS design system resources including CSS, SCSS, fonts, images, and JavaScript components to build compliant Korean government digital services.

Instructions

KRDS 리소스 파일 경로와 사용법을 가져옵니다.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
resourceTypeYes리소스 타입 (css, scss, fonts, images, js)

Implementation Reference

  • Main handler function for 'get_krds_resources' tool. Validates input, fetches resource paths using KRDSLoader, formats usage information and file list into a markdown response.
    private async handleGetResources(args: any) {
      if (!args?.resourceType) {
        throw new Error('resourceType이 필요합니다.');
      }
    
      const files = await this.loader.getResourcePaths(args.resourceType);
      
      const usageMap: Record<string, string> = {
        css: 'HTML에서 사용: <link rel="stylesheet" href="node_modules/krds-uiux/resources/css/krds.css">',
        scss: 'SCSS 파일에서 import: @import "node_modules/krds-uiux/resources/scss/krds";',
        fonts: '폰트는 CSS 파일에 이미 포함되어 있습니다.',
        images: 'HTML에서 사용: <img src="node_modules/krds-uiux/resources/img/image.png">',
        js: 'JavaScript에서 import: import "node_modules/krds-uiux/resources/js/krds.js";',
      };
    
      const text = 
        `# KRDS ${args.resourceType.toUpperCase()} 리소스\n\n` +
        `**파일 개수:** ${files.length}개\n\n` +
        (files.length > 0
          ? `**파일 목록:**\n${files.map(f => `• ${f}`).join('\n')}\n\n`
          : '파일이 없습니다.\n\n') +
        `**사용법:**\n${usageMap[args.resourceType as keyof typeof usageMap] || '사용법 정보가 없습니다.'}`;
      
      return {
        content: [{ type: 'text', text }],
      };
    }
  • Core helper method in KRDSLoader that reads the directory for the specified resource type and returns relative paths to the resource files.
    async getResourcePaths(resourceType: 'css' | 'scss' | 'fonts' | 'images' | 'js'): Promise<string[]> {
      const resourcesPath = join(this.krdsPath, 'resources');
      const targetPath = join(resourcesPath, resourceType);
    
      try {
        const files = await readdir(targetPath);
        return files.map(file => join('node_modules', 'krds-uiux', 'resources', resourceType, file));
      } catch {
        return [];
      }
    }
  • src/index.ts:198-212 (registration)
    Tool registration in getTools() method, including name, description, and input schema definition.
    {
      name: 'get_krds_resources',
      description: 'KRDS 리소스 파일 경로와 사용법을 가져옵니다.',
      inputSchema: {
        type: 'object',
        properties: {
          resourceType: {
            type: 'string',
            description: '리소스 타입 (css, scss, fonts, images, js)',
            enum: ['css', 'scss', 'fonts', 'images', 'js'],
          },
        },
        required: ['resourceType'],
      },
    },
  • src/index.ts:81-82 (registration)
    Handler dispatch registration in the switch statement within CallToolRequestSchema handler.
    case 'get_krds_resources':
      return await this.handleGetResources(args);
  • Input schema definition for the resourceType parameter, including type, description, and allowed enum values.
        resourceType: {
          type: 'string',
          description: '리소스 타입 (css, scss, fonts, images, js)',
          enum: ['css', 'scss', 'fonts', 'images', 'js'],
        },
      },
      required: ['resourceType'],
    },
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 of behavioral disclosure. It states the tool fetches file paths and usage, implying a read-only operation, but doesn't specify whether this requires authentication, has rate limits, returns structured data, or involves any side effects. For a tool with no annotation coverage, this leaves significant behavioral gaps, though it doesn't contradict any annotations.

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 in Korean that directly states the tool's function without unnecessary words. It's front-loaded with the core action and target, making it easy to parse. Every part of the sentence contributes to understanding the purpose, with zero waste or redundancy.

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 has one parameter with full schema coverage and no output schema, the description adequately covers the basic purpose. However, with no annotations and siblings that might overlap, it lacks context on behavioral traits, usage distinctions, and output format. For a simple read tool, this is minimally viable but leaves room for improvement in guiding the agent 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 parameter 'resourceType' fully documented in the schema (including enum values and description). The description doesn't add any semantic details beyond what the schema provides, such as explaining how the resource type affects the output or providing examples. With high schema coverage, the baseline is 3, as the description doesn't compensate but doesn't detract either.

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 tool's purpose: '가져옵니다' (get/fetch) 'KRDS 리소스 파일 경로와 사용법' (KRDS resource file paths and usage). It specifies both what is retrieved (paths and usage) and the target (KRDS resources), making the verb+resource combination explicit. However, it doesn't distinguish this tool from siblings like 'get_component_code' or 'search_krds_components', which might also retrieve KRDS-related information, so it lacks sibling differentiation.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, context, or exclusions, and with siblings like 'get_component_code' and 'search_krds_components' that might overlap, there's no indication of how this tool differs in scope or application. The description is purely functional without usage 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