generate_api_endpoint
Generate custom API endpoints with Express route handlers and Swagger documentation. Define HTTP method, path, schemas, and permissions.
Instructions
Generate custom API endpoints with Express route handlers and Swagger documentation
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": {
"moduleId": "<moduleId>",
"endpointPath": "<endpointPath>",
"method": "<method>",
"handlerName": "<handlerName>",
"description": "<description>"
},
"name": "generate_api_endpoint"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| method | Yes | HTTP method | |
| moduleId | Yes | Module ID (kebab-case) | |
| description | Yes | Endpoint description | |
| handlerName | Yes | Handler function name (camelCase) | |
| permissions | No | Required permissions (optional) | |
| endpointPath | Yes | API endpoint path (e.g., /process-payment) | |
| requestSchema | No | Request body schema (optional) | |
| responseSchema | No | Response schema (optional) |