generate_composable
Creates a new Vue 3 composable file for a Nuxt 4 codebase. Define name, path, props, and return values to generate the file.
Instructions
Generate a composable in the target Nuxt 4 codebase. Creates a new composable file with Vue 3 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_composable"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name of the composable (e.g., 'useAuth', 'useFetch') | |
| relativePath | Yes | Relative path in target (e.g., 'composables/useAuth.ts') | |
| module | No | Optional module name to prefix path (e.g., 'deals', 'tickets') | |
| targetPath | No | Optional absolute target path override | |
| props | No | Optional props/refs to include | |
| returnValues | No | Optional values to return |