Skip to main content
Glama
AVEVA E3D MCP Server

AVEVA E3D MCP Server

e3d_execute_pml_script

Destructive

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

NameRequiredDescriptionDefault
sourceYesComplete 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_runNo
request_idNoOptional canonical UUID (any version), normalized to lowercase. Generated for real execution if omitted. Preview only validates it and creates no receipt.
capture_afterNoAfter a confirmed successful operation, return a native E3D image receipt.
capture_widthNo
capture_heightNo
expected_session_idNoOptional session_id from e3d_status; a mismatch rejects the script before execution. Real execution reads /health first when omitted.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already flag destructiveHint=true and idempotentHint=false, but the description goes well beyond them: no rollback, no automatic retry, partially executed effects, no redaction of native output or source excerpts in errors, a receipt with no submitted-source field, and one-accept-per-session request_id semantics. It also explains session-guard behavior via /health and precisely which outcome flags (outcome_uncertain, retry_safe, pml_script_request) survive a transport timeout. This is unusually rich disclosure for a destructive operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded in the first sentence and nearly every subsequent sentence carries operational payload a caller needs. The cost is density: it arrives as one undifferentiated block of long clauses, so the safety-critical lines (no rollback, never replay an uncertain script) are harder to scan than they should be.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive, non-idempotent, open-world tool with no output schema, the description covers the execution path, encoding validation, session guard, request_id lifecycle, receipt field caveats, and failure/timeout recovery routing. An agent can call this correctly, interpret the outcome, and know what not to do afterward without needing additional context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With schema coverage at 57%, the description carries real weight: it restates the source constraints (non-empty, valid Unicode, no NUL, 262144 strict UTF-8 bytes, verbatim formatting), explains that request_id is auto-assigned only for real execution and is merely validated in preview, and describes expected_session_id as a /health-backed session guard. capture_after is expanded to "returns an image only after confirmed success." Only capture_width and capture_height are left without any semantic guidance in either place.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Preview or execute a complete PML script, including IF/DO blocks, via an adapter-owned temporary macro in an independent nested scope" gives a specific verb pair, a specific resource, and scope details (macro ownership, nested scope) that an agent could not infer from the name. It falls short of a 5 only because it never explicitly distinguishes this tool from the closely named siblings e3d_execute_pml and e3d_execute_pml_batch.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The definition states concrete preconditions and exclusions: dry_run=true validates input and code-page encoding but "does not check syntax," while real execution requires dry_run=false plus E3D_MCP_ALLOW_COMMANDS=true. It also routes the agent to e3d_pml_script_status for uncertain requests and forbids replaying an uncertain script with a new ID. The one gap is that it does not say when to pick this over e3d_execute_pml or the batch variant.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools