components-mcp

v0.11.2
@punica/components-mcp Checked 10 hours ago Published 3 days ago

MCP 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.

ParameterTypeDescription
query *stringWhat the element is for, in plain words
limitinteger

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.

ParameterTypeDescription
tags *arrayTags such as punica-select, or bare names such as select
briefbooleanLeave 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.

ParameterTypeDescription
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.

ParameterTypeDescription
code *stringThe markup or script to check
kindstringGuessed 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).

ParameterTypeDescription
querystringKeep 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.

ParameterTypeDescription
topicstring