• Resolve a Foundry Macro by UUID and run it via Macro#execute.

    Parameters

    • uuid: string

      The Macro document UUID referenced by a Script action.

    • scope: Record<string, unknown>

      Variables passed to the macro body (Foundry spreads these as { speaker, actor, token, ...scope }).

    Returns Promise<unknown>

    The macro's result, or undefined if the UUID does not resolve to a Macro (a non-Macro or missing document is ignored, not executed).

    This is the sanctioned way to run author-supplied ("homebrew") behavior: the command lives in a permission-gated Macro document, never in system data, and Macro#execute enforces canUserExecute (ownership and the MACRO_SCRIPT user permission) before running. No code is ever compiled from serialized data. See sohl.entity.action.SohlAction and the Security Model doc.