Skip to main content
Glama

Run ExtendScript

execute_extendscript
Destructive

Run custom ExtendScript inside Premiere Pro when no dedicated tool covers a task, returning the script result as plain data.

Instructions

Run arbitrary ExtendScript inside Premiere Pro and return its result. Use it only when no dedicated tool covers the task (search with find_tools first); it can change or delete anything. ExtendScript is ES3: no let/const, arrow functions, JSON or Array.prototype.map. The helper library is available as $._pmcp (e.g. $._pmcp.seq({}), $._pmcp.json.stringify). Returns {result, type}; host objects in the result are converted to plain data. Premiere runs one script at a time, so a long script blocks every other tool until it ends; avoid loops of QE calls and never call APIs that open a dialog.

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": "execute_extendscript"
  }
}

Input Schema

NameRequiredDescriptionDefault
scriptYesExtendScript source. Without as_function, the value of the last expression is returned.
enable_qeNoEnable the QE DOM (global `qe`) before running. Default false.
as_functionNoWrap the script in a function body so it can use `return`. Default false.
timeout_secondsNoHow long the server waits for the result, in seconds, 1-3600. Default 60.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and readOnlyHint=false, and the description adds materially more: it can change or delete anything, Premiere serializes execution so a long script blocks every other tool, and dialogs must be avoided. It also discloses the return shape {result, type} and that host objects are converted to plain data, none of which is in the annotations.

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

Conciseness5/5

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

Dense but front-loaded: purpose and fallback rule come first, then language constraints, helper library, return shape, and finally the concurrency caveat. Every sentence carries distinct information with no restatement of the tool name or title.

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 high-risk escape-hatch tool with no output schema, the description covers the essentials an agent needs: when to reach for it, language constraints, available helpers, the return contract, and the blocking behavior. Nothing required to call it safely is missing.

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?

Schema coverage is 100%, so the schema itself documents script, enable_qe, as_function and timeout_seconds. The description still adds real meaning for the script parameter that the schema cannot convey: ES3 language limits (no let/const, arrow functions, JSON, map) and the $._pmcp helper library with examples, which directly shape how the source must be written.

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

Purpose5/5

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

States a specific verb and resource ('Run arbitrary ExtendScript inside Premiere Pro and return its result') and immediately marks itself as the fallback path ('Use it only when no dedicated tool covers the task'). An agent can tell this apart from the many specific sibling tools without opening any schema.

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

Usage Guidelines5/5

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

Explicitly names the when-not condition ('only when no dedicated tool covers the task') and the routing step to take first ('search with find_tools'). It also gives operational exclusions: avoid loops of QE calls and never call APIs that open a dialog.

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