scaffold_nitro_api
Generate a Nitro API handler under server/api/ with H3 defineEventHandler and optional Zod body validation, supporting HTTP method selection and dry-run preview.
Instructions
Generate a new Nitro server API handler under server/api/ with H3 defineEventHandler and optional Zod body validation.
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": {
"path": "<path>"
},
"name": "scaffold_nitro_api"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| zod | No | Include readValidatedBody with a Zod schema (default false) | |
| path | Yes | API path, e.g. /api/hello or /api/users/:id | |
| dryRun | No | When true (default), return the planned file without writing | |
| method | No | HTTP method (default: handle all methods) |