e3d_execute_pml_script
Preview or run a complete PML script, including IF/DO blocks, through an isolated temporary macro; use dry-run validation or controlled execution with receipt and status tracking.
Instructions
Preview or execute a complete PML script, including IF/DO blocks, via an adapter-owned temporary macro in an independent nested scope. source must be non-empty valid Unicode, contain no NUL and occupy at most 262144 strict UTF-8 bytes; source formatting is preserved. dry_run=true validates input and the running E3D code-page encoding only: it creates no file, performs no execution and does not check syntax. Real execution requires dry_run=false and E3D_MCP_ALLOW_COMMANDS=true. Inspect execution_attempted/completed, native_run_returned, outcome_uncertain, error_metadata and cleanup; failures can leave partially executed effects, with no rollback or automatic retry. The receipt has no submitted source/command field; native output and errors may contain printed values or source excerpts and are not redacted. Execution assigns a UUID request_id when omitted and reads /health for a session guard when expected_session_id is omitted; no script is submitted without a session. A transport timeout or disconnection retains outcome_uncertain=true, retry_safe=false and pml_script_request identifiers; it does not automatically inspect command state, cancel, read messages or resend the script. Use e3d_pml_script_status to look up an uncertain request. A request_id can be accepted only once per session; never replay an uncertain script with a new ID. byte_count/source_sha256 describe original UTF-8 source; encoding.byte_count describes the actual macro bytes and reports any terminal newline added. Local ! variables stay within this script; !! globals are session state. capture_after returns an image only after confirmed success.
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": {
"source": "<source>"
},
"name": "e3d_execute_pml_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | Complete source, preserved verbatim; non-whitespace, no NUL or invalid Unicode, at most 262144 UTF-8 bytes. The running E3D code page may reject characters that UTF-8 accepts. | |
| dry_run | No | ||
| request_id | No | Optional canonical UUID (any version), normalized to lowercase. Generated for real execution if omitted. Preview only validates it and creates no receipt. | |
| capture_after | No | After a confirmed successful operation, return a native E3D image receipt. | |
| capture_width | No | ||
| capture_height | No | ||
| expected_session_id | No | Optional session_id from e3d_status; a mismatch rejects the script before execution. Real execution reads /health first when omitted. |