generate_web_component
Generate a framework-agnostic Web Component using Custom Elements v1 spec with shadow DOM and lifecycle hooks
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"tagName": "<tagName>"
},
"name": "generate_web_component"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tagName | Yes | Kebab-case custom element tag name (e.g. my-button, user-avatar) | |
| withCss | No | Include inline styles / CSS vars | |
| withSlots | No | Include named slots | |
| attributes | No | Comma-separated observed attributes | |
| withShadowDom | No | Use shadow DOM for encapsulation (default: true) |