components-mcp
v0.11.2MCP server for @punica/components: find elements, read their API and examples, validate markup.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
search_components Find punica elements
Finds punica-* elements by what they are for ("date range", "side navigation", "confirm dialog"), best match first.
| Parameter | Type | Description |
|---|---|---|
query * | string | What the element is for, in plain words |
limit | integer |
get_component An element's API
The API of one or more punica elements: attributes with their exact values, properties, methods, events, slots, CSS parts, custom properties and states. Pass brief: true when you write markup and do not style the inside of the element: it leaves out the parts, custom properties and states and is about a quarter shorter.
| Parameter | Type | Description |
|---|---|---|
tags * | array | Tags such as punica-select, or bare names such as select |
brief | boolean | Leave out CSS parts, custom properties and states |
get_examples Examples of an element
The documentation page of an element as Markdown: what it is for, working HTML examples and its behaviour. Fetched from the documentation site.
| Parameter | Type | Description |
|---|---|---|
tag * | string |
validate_markup Check punica markup
Checks HTML, JSX, Vue, script or CSS that uses punica elements: unknown tags and 1.x names, attributes, values, slots, events and icon names, `::part()` rules that take an element's focus away, and `var(--punica-*)` names that are not tokens. Returns each problem with its line and a fix.
| Parameter | Type | Description |
|---|---|---|
code * | string | The markup or script to check |
kind | string | Guessed from the code when absent |
get_tokens The design tokens
The `--punica-*` design tokens (colours, spacing, radius, type, shadows, motion) with their light and dark values, by group. Read it before writing var(--punica-…) in your own CSS: the names are exact (spacing is named by pixel value, --punica-space-16 is 16px).
| Parameter | Type | Description |
|---|---|---|
query | string | Keep the groups or names that contain this, such as "space", "color" or "radius" |
get_guide How to use the library
Without a topic: the rules every punica element follows (loading, attributes, events, forms, overlays, theming, frameworks). With a topic: that guide page from the documentation site.
| Parameter | Type | Description |
|---|---|---|
topic | string |