get_component
Resolve a v0.2 component using base, size, variant, and state inheritance.
Resolve one component cell from a design document. The resolver applies
base → size → variant.default → variant.state in that fixed order. A missing
state falls back to the selected variant’s default; an unknown component,
variant, size, or state returns a tool error.
Input schema
{
"slug": "linear",
"component": "button",
"variant": "primary",
"state": "hover",
"size": "sm"
}
slug and component are required. variant, state, and size are
optional. Supported states are default, hover, active, focus-visible,
and disabled.
Output
{
"slug": "linear",
"component": "button",
"selection": { "variant": "primary", "state": "hover", "size": "sm" },
"resolved": {
"padding": "6px 10px",
"backgroundColor": "#555fbd"
}
}
Color references and safe v0.2 color expressions are resolved before they are returned. The source Markdown is not modified.