melta UI

v1.9.1
io.github.tsubotax/melta-ui Checked 3 days ago Published 1 month ago

AI-Ready design system MCP: melta UI tokens, component contracts, 107 rules, check_html self-verify

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_token

Get a design token by dot-path. Returns the token object with its value and class mapping.

ParameterTypeDescription
path *stringDot-separated path to the token (e.g. "color.primary.600", "spacing.4", "radius.lg", "typography.fontSize.base")

get_component

Get component metadata including variants, sizes, accessibility requirements, HTML sample, per-state specs (stateSpecs: disabled/loading/open/empty etc. — each with delta class strings + aria changes), and anatomy parts (overlay/container/th etc. with element/roles/class). Prefer these structured fields over inferring states from the HTML sample.

ParameterTypeDescription
id *stringComponent ID (e.g. "button", "card", "table", "sidebar")

check_rule

Check class strings against this design system's prohibition rules. Returns violations with reasons and alternatives.

ParameterTypeDescription
classes *stringSpace-separated class string to check (e.g. "text-black shadow-2xl bg-green-500")

check_html

Lint a full HTML/JSX source against melta-ui rules — the same checks as CI and the PostToolUse hook (class rules + html-attr rules + composition rules for HTML). Use this AFTER generating UI code to self-verify before presenting it. Response always includes coverage info (manual rules cannot be auto-checked).

ParameterTypeDescription
source *stringFull source code to lint (HTML / JSX / Vue template)
sourceTypestringSource type. "html" (default) also runs composition lint (nested modal etc.); "jsx" runs class + attr lint only

get_rules

Get melta-ui prohibition rules from rules.json (107 total). Use this to retrieve manual/contextual rules that check_rule cannot auto-detect. Supports filtering by category, severity, or detector.

ParameterTypeDescription
categorystringFilter by category (e.g. "color", "spacing", "accessibility", "button", "modal")
detectorstringFilter by detector type
severitystringFilter by severity