generateEventHandler
Generate Mantis SDK event handler code for any event type and action, tailored to your framework. Use it to convert cart-opened or model-click triggers into ready-to-run code.
Instructions
Generate event handler code for Mantis SDK events
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": {
"event": "<event>",
"action": "<action>",
"framework": "<framework>"
},
"name": "generateEventHandler"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| event | Yes | Event type (cart-opened, model-click, etc.) | |
| action | Yes | Action to perform when event fires | |
| framework | Yes | Target framework for code generation |