Skip to main content
Glama

KRDS 컴포넌트 공급

get_component
Read-onlyIdempotent

Generate a KRDS component’s markup and KWCAG accessibility requirements by supplying required inputs; missing inputs return field guidance for retry.

Instructions

KRDS 컴포넌트 하나의 마크업과 접근성 요건을 반환한다. 필수 입력(레이블·대체 텍스트 등)을 inputs에 채워야 마크업을 준다 — 비우면 isError 응답으로 채울 필드명과 입력 예시를 안내하니, 그대로 채워 다시 부른다. breadcrumb·pagination·radio_button·checkbox·text_input·select는 입력값을 넣은 마크업을 만들어 주고, 나머지는 킷 원본과 채워 넣을 값을 준다. 페이지 전체 뼈대는 get_page_scaffold, 요건만 볼 때는 get_requirements, id·변형·필드명 목록은 list_components. 반환: 마크다운 — 마크업, 보장 항목, 페이지에서 따로 확인할 항목, 조립 지침, 킷 동작(상태 클래스·초기화), 필요하면 아이콘 교정 CSS.

Input Schema

NameRequiredDescriptionDefault
inputsNo필드명 → 값. 필드명은 list_components 각 줄의 '필드:' 목록에 있다. 여러 값은 쉼표로 잇거나 배열로, 반복 항목은 객체 배열로 준다(예: crumbs: [{crumbLabel, href}]). 확인용 입력(modalPlacement 등)은 true
variantNo변형 이름 — list_components 각 줄의 '변형:' 목록 중 하나(예: button의 'icon'). 없으면 기본형
componentIdYes컴포넌트 id — 'krds:button' 또는 'button'

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.2.0
    • changedInput schema / properties / inputs / description
      Previous value: -"필수 입력 값 — 필드명: 값. 배열(헤더 목록 등)은 쉼표로 이어 받는다. 반복 항목은 객체 배열로 줘도 된다 — 예: crumbs: [{crumbLabel, href}, …]. 바깥 키 이름(crumbs·items 등)은 자유이고 항목 안의 키가 필드명이다. 상태 입력: required(필수 표시)·checked(선택된 항목)는 불리언, errorMessage(오류 상태), currentPage(현재 쪽). 확인용 입력(modalPlacement·captionSync 등 구현 의무 확인)은 true를 준다. breadcrumb·pagination·radio_button·checkbox·text_input·select는 값을 넣은 마크업을 만들어 준다. 미제공 시 요건 안내만 반환하고 마크업은 주지 않는다"New value: +"필드명 → 값. 필드명은 list_components 각 줄의 '필드:' 목록에 있다. 여러 값은 쉼표로 잇거나 배열로, 반복 항목은 객체 배열로 준다(예: crumbs: [{crumbLabel, href}]). 확인용 입력(modalPlacement 등)은 true"
    • changedInput schema / properties / variant / description
      Previous value: -"변형 이름 — 예: 'icon', 'size'. 킷 파일명 접미사와 같다"New value: +"변형 이름 — list_components 각 줄의 '변형:' 목록 중 하나(예: button의 'icon'). 없으면 기본형"
  2. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

Although annotations already declare read-only, idempotent, non-destructive behavior, the description adds important operational details: empty inputs trigger an isError with field names and examples, and the retry loop is explained. It also discloses component-specific behavior and the full markdown return contents, including guaranteed items, manual checks, assembly instructions, kit behavior, and optional icon CSS.

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 dense but front-loaded: purpose first, then input requirement, component categories, sibling alternatives, and return format. Every sentence carries actionable information, and there is no filler.

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

Completeness5/5

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

For a read-only component retrieval tool with no output schema, the definition explains the input preconditions, error recovery, component-specific behavior, sibling routing, and return structure. An agent has enough information to invoke it correctly and interpret the response.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already documents componentId, variant, and inputs thoroughly. The description still adds value by clarifying that inputs must contain required fields, that missing fields cause an isError response, and that field names come from list_components.

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

Purpose5/5

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

The description opens with a specific verb and resource: it returns the markup and accessibility requirements for one KRDS component. It also distinguishes the tool from siblings by naming get_page_scaffold, get_requirements, and list_components as separate purposes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives explicit usage conditions: fill required inputs or receive an isError response guiding the missing fields, then retry. It also routes agents to get_page_scaffold for page structure, get_requirements for requirements only, and list_components for ids, variants, and field names.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.