generate_api_route
Generate production-ready API routes with built-in validation, authentication, and error handling. Supports REST, auth, webhooks, and realtime endpoints for Express and Next.js.
Instructions
Generate a production-ready API route with validation, authentication, and error handling based on best-practice backend patterns.
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": {
"route_type": "<route_type>",
"resource_name": "<resource_name>"
},
"name": "generate_api_route"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| route_type | Yes | Type of API route to generate | |
| resource_name | Yes | Name of the resource (e.g., users, products) | |
| framework | No | Target framework | nextjs |
| features | No | Additional features: validation, auth, rate-limiting, caching |