macro-execute
Run a macro the way its hotbar button does: a chat macro posts its command, a script macro runs its JavaScript with GM rights (needs the module setting Allow Script Macros, off by default). args reaches a script macro as args / scope.args and the macro's return value comes back as result — bridge module 8.18.0+; older modules take no args and answer no result (the effect shows in chat-list or the world).
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": {
"macroId": "<macroId>"
},
"name": "macro-execute"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | JSON object the macro reads as args (target, item, options); up to 64 KB | |
| actorId | No | Actor ID (from actor-list or actor-filter); the macro sees it as actor | |
| macroId | Yes | Macro ID (from macro-list) | |
| tokenId | No | Token ID on the active scene (from token-list); the macro sees it as token |