pi_run_pjsr
pi_run_pjsrRun arbitrary PixInsight JavaScript (PJSR) directly in the active instance to execute custom processing or return JSON results, enabling advanced automation beyond predefined operations.
Instructions
Escape hatch: run arbitrary PJSR (PixInsight JavaScript) inside the warm PixInsight instance. Assign result = ... to return JSON. Helpers: PIMCP.win.view(id), PIMCP.stf, PIMCP.preview.render(view,{out_path}), PIMCP.K.{GRAY,RGB,REAL,INTEGER,NOSWAP} (macros are not visible to eval). Gated by config allowRawScripts.
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": {
"script": "<script>"
},
"name": "pi_run_pjsr"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| script | Yes | ||
| timeout_ms | No | ||
| script_args | No |