execute_indesign_code
Execute JavaScript code in InDesign's UXP context to perform operations not covered by other tools, with full document access and explicit safety confirmation.
Instructions
Execute arbitrary JavaScript code in the InDesign UXP context. WARNING: this runs with full InDesign DOM access and can create, modify, or destroy documents. Use only as a last resort when no other tool covers the operation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | JavaScript code to execute in UXP context. Has access to `app` (InDesign application object). | |
| dangerousConfirmation | Yes | Must be exactly: "I understand this executes arbitrary InDesign code" |