app_run_hat
Trigger a hat block live in the mBlock app to start event-driven scripts instantly.
Instructions
LIVE: run a hat block in the app (app.workspace.runBlocks).
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": {
"opcode": "<opcode>"
},
"name": "app_run_hat"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| opcode | Yes | Hat opcode, e.g. event_whenflagclicked |