run_jsx
Execute custom ExtendScript code in InDesign to automate tasks not covered by other tools.
Instructions
Runs arbitrary ExtendScript code in InDesign. Use for custom automation not covered by other tools.
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": {
"code": "<code>"
},
"name": "run_jsx"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ExtendScript (JavaScript) code to run in InDesign. Warning: run trusted code only. | |
| waitForResult | No | When true, waits for the result (until timeout). When false, returns immediately. |