Skip to main content
Glama

search_design_tokens

Search KRDS design tokens including colors, spacing, and typography to find specific values for Korean government digital services.

Instructions

KRDS 디자인 토큰을 검색합니다 (색상, 간격, 타이포그래피 등).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNo토큰 타입 (예: color, spacing, typography)
queryNo검색할 키워드 (예: primary, blue, font)

Implementation Reference

  • Core handler function implementing the search_design_tokens tool logic. It delegates to KRDSLoader.searchTokens with optional type and query filters.
    export async function searchDesignTokens(
      loader: KRDSLoader,
      type?: string,
      query?: string
    ): Promise<TokenSearchResult[]> {
      return await loader.searchTokens(type, query);
    }
  • src/index.ts:151-167 (registration)
    Tool registration in getTools() method, defining name 'search_design_tokens', description, and input schema.
    {
      name: 'search_design_tokens',
      description: 'KRDS 디자인 토큰을 검색합니다 (색상, 간격, 타이포그래피 등).',
      inputSchema: {
        type: 'object',
        properties: {
          type: {
            type: 'string',
            description: '토큰 타입 (예: color, spacing, typography)',
          },
          query: {
            type: 'string',
            description: '검색할 키워드 (예: primary, blue, font)',
          },
        },
      },
    },
  • MCP protocol handler that executes the tool, calls the core searchDesignTokens function, handles empty results, formats output as formatted text response.
    private async handleSearchTokens(args: any) {
      const results = await searchDesignTokens(this.loader, args?.type, args?.query);
      
      if (results.length === 0) {
        return {
          content: [{
            type: 'text',
            text: '검색 결과가 없습니다.',
          }],
        };
      }
    
      const text = `찾은 디자인 토큰 (${results.length}개):\n\n` +
        results.slice(0, 50).map(token => 
          `🎨 ${token.name}\n` +
          `   값: ${token.value}\n` +
          `   타입: ${token.type}\n` +
          `   CSS: var(${token.cssVariable})\n` +
          `   SCSS: ${token.scssVariable}`
        ).join('\n\n') +
        (results.length > 50 ? `\n\n... 그 외 ${results.length - 50}개` : '');
      
      return {
        content: [{ type: 'text', text }],
      };
    }
  • TypeScript interface defining the structure of TokenSearchResult, used as output type for the search_design_tokens tool.
    export interface TokenSearchResult {
      name: string;
      value: string;
      type: string;
      cssVariable?: string;
      scssVariable?: string;
    }
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 for behavioral disclosure. The description only states what the tool does (searches design tokens) but doesn't disclose any behavioral traits like whether it's read-only, what format results are returned in, whether there are rate limits, authentication requirements, or what happens when no results are found. For a search tool with zero annotation coverage, this is inadequate.

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 - a single sentence that efficiently communicates the core purpose. There's no wasted language or unnecessary elaboration. It's appropriately sized for a simple search tool with only two parameters.

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 that there are no annotations and no output schema, the description should provide more complete context. For a search tool that presumably returns results, the description doesn't indicate what format results come in, whether they're paginated, what fields are included, or how comprehensive the search is. The description is too minimal for the tool's likely complexity.

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 schema description coverage is 100%, with both parameters ('type' and 'query') having clear descriptions in the schema. The description adds minimal value beyond the schema by mentioning examples of token types ('색상, 간격, 타이포그래피 등') that align with the 'type' parameter, but doesn't provide additional semantic context. This meets the baseline of 3 when schema coverage is high.

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 ('검색합니다' - searches) and resource ('KRDS 디자인 토큰' - KRDS design tokens), and specifies examples of what can be searched ('색상, 간격, 타이포그래피 등' - color, spacing, typography, etc.). However, it doesn't explicitly differentiate from sibling tools like 'search_krds_components' or 'get_color_palette', which reduces it from 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 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. With sibling tools like 'search_krds_components', 'get_color_palette', and 'get_token_stats' available, there's no indication of when this search tool is appropriate versus those other tools for finding design-related information.

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