generate_component
Creates a Vue component in a Nuxt 4 codebase using Composition API. Supports props, emits, and optional Pinia store integration.
Instructions
Generate a Vue component in the target Nuxt 4 codebase. Creates a new component with Composition API.
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": {
"name": "<name>",
"relativePath": "<relativePath>"
},
"name": "generate_component"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name of the component (e.g., 'UserCard', 'Button') | |
| relativePath | Yes | Relative path in target (e.g., 'components/UserCard.vue') | |
| module | No | Optional module name to prefix path (e.g., 'deals', 'tickets') | |
| targetPath | No | Optional absolute target path override | |
| props | No | Optional props to include | |
| emits | No | Optional emits to include | |
| hasStore | No | Whether component uses a Pinia store | |
| storeName | No | Name of the store if hasStore is true |