Skip to main content
Glama

Run Script

photopea_run_script
Destructive

Execute custom JavaScript in Photopea to manipulate documents and layers via the full scripting API. Access app and activeDocument objects for advanced operations beyond standard tools.

Instructions

Execute arbitrary Photopea/ExtendScript JavaScript in the Photopea environment. Use this for advanced operations not covered by other tools. Has full access to the Photopea DOM (app, activeDocument, layers). Use with caution — scripts can modify or delete any document data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scriptYesPhotopea JavaScript code to execute. Must call app.echoToOE(result) to return data. Has access to the full Photopea scripting API (app, activeDocument, etc.).

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/attalla1/photopea-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server