generate_composable
Creates a new Nuxt composable in the resolved composables directory, normalizes names to useXxx, and returns a typed export.
Instructions
Generate a new composable under the project composables directory (honoring srcDir) with a typed export. Names are normalized to useXxx.
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>"
},
"name": "generate_composable"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Composable name, e.g. useCounter or counter | |
| dryRun | No | When true (default), return the planned file without writing | |
| returns | No | Optional return type annotation, e.g. { count: Ref<number> } |