Execute ExtendScript
ps_execute_scriptExecute custom ExtendScript commands in Photoshop to perform tasks beyond standard tool capabilities. Solves the need for advanced or unsupported operations.
Instructions
Runs arbitrary ExtendScript code directly in Photoshop. This is the escape hatch for anything the other tools cannot do. The script string is passed to Photoshop as-is. Use with care — there are no guardrails. Returns whatever the script evaluates to.
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": "ps_execute_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| script | Yes | Raw ExtendScript code to execute in Photoshop |