execute_indesign_code
Run custom ExtendScript in InDesign to automate tasks not covered by built-in tools. Requires enabling arbitrary code execution via INDESIGN_ALLOW_ARBITRARY_CODE=1.
Instructions
⚠️ Execute custom ExtendScript code in InDesign (REQUIRES INDESIGN_ALLOW_ARBITRARY_CODE=1)
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": "execute_indesign_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ExtendScript/JavaScript code to execute in InDesign. WARNING: Can access filesystem, network, and system APIs! |