generate_shortcode
Generate a complete WordPress shortcode class including a render method, based on your plugin's root namespace and class name.
Instructions
Generate a Shortcode class with render method.
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>",
"className": "<className>"
},
"name": "generate_shortcode"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rootNamespace | Yes | Plugin root namespace (e.g., "MyPlugin") | |
| className | Yes | Class name (e.g., "ShortcodesExample") | |
| extraTokens | No | Additional token replacements |