woo_scaffold_rest_extension
Generate a WooCommerce REST API controller scaffold that adds custom endpoints under the WC namespace with configurable routes and methods.
Instructions
Generate a WooCommerce REST API extension controller that adds custom endpoints under the WC REST API namespace.
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": {
"rootNamespace": "<rootNamespace>",
"resourceName": "<resourceName>",
"restBase": "<restBase>"
},
"name": "woo_scaffold_rest_extension"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rootNamespace | Yes | Plugin root namespace | |
| resourceName | Yes | Resource name (e.g., "CustomReport") | |
| restBase | Yes | REST route base (e.g., "custom-reports") | |
| endpoints | No | Endpoints: index,show,create (default: index,show) |