generate_rest_endpoint
Create WordPress REST API endpoints by defining namespace, route, HTTP method, parameters, and callback function for custom API functionality.
Instructions
Generate WordPress REST API endpoint
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": {
"namespace": "<namespace>",
"route": "<route>",
"callback": "<callback>"
},
"name": "generate_rest_endpoint"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| namespace | Yes | REST API namespace | |
| route | Yes | Route path | |
| method | No | HTTP method | |
| description | No | Endpoint description | |
| parameters | No | Endpoint parameters | |
| callback | Yes | Callback function name |