Module Controller Create
module_controller_createGenerate a Drupal controller class with its route definition for a custom module. Provide machine name and controller name to scaffold the class and routing file.
Instructions
Create a controller class with routing.
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": {
"machine_name": "<machine_name>",
"controller_name": "<controller_name>"
},
"name": "module_controller_create"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | ||
| methods | No | ||
| class_name | No | ||
| machine_name | Yes | ||
| controller_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||