Skip to main content
Glama
leancoderkavy

Premiere Pro MCP Server

execute_extendscript

Execute custom ExtendScript code in Premiere Pro to automate tasks like modifying clips, sequences, or properties. Use ES3 syntax with built-in helpers.

Instructions

Execute custom ExtendScript code in Premiere Pro. The code runs inside an IIFE with helper functions available.

IMPORTANT: You MUST write ES3 syntax (var instead of let/const, no arrow functions, no template literals, no destructuring).

Available helpers (auto-prepended):

  • __ticksToSeconds(ticks) / __secondsToTicks(seconds) — time conversion

  • __ticksToTimecode(ticks, fps) — timecode string

  • __findSequence(idOrName) — find sequence by name or ID

  • __findProjectItem(nodeIdOrName) — find project item recursively

  • __findClip(nodeId) — find clip in active sequence, returns {clip, trackIndex, clipIndex, trackType}

  • __getAllClips(seq) — get all clips in a sequence

  • __result(data) — return success with data (MUST call this or __error)

  • __error(msg) — return error message

  • TICKS_PER_SECOND — constant 254016000000

  • app.enableQE() — enable QE DOM access

Your code MUST end with: return __result({...}) or return __error("message")

Example: Set opacity to 50% on all video clips var seq = app.project.activeSequence; if (!seq) return __error("No active sequence"); var count = 0; for (var t = 0; t < seq.videoTracks.numTracks; t++) { var track = seq.videoTracks[t]; for (var c = 0; c < track.clips.numItems; c++) { var clip = track.clips[c]; for (var i = 0; i < clip.components.numItems; i++) { var comp = clip.components[i]; if (comp.displayName === "Opacity") { for (var p = 0; p < comp.properties.numItems; p++) { if (comp.properties[p].displayName === "Opacity") { comp.properties[p].setValue(50, true); count++; } } } } } } return __result({updated: count});

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesExtendScript code to execute (ES3 syntax). Must use return __result({...}) or return __error('...'). Helpers are auto-prepended.
timeout_msNoCustom timeout in milliseconds (default: 30000). Increase for long operations.
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses many behaviors: IIFE execution, auto-prepended helpers, required syntax, timeout parameter, and a detailed example. It could be more explicit about potential side effects (e.g., project state modification) but overall is quite transparent.

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 description is well-structured: purpose first, then constraints, then helpers, then example. It is long but efficient; every part adds value. Could be slightly shortened by moving the example, but overall concise for the complexity.

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

Completeness4/5

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

Given the complexity (code execution, no output schema, many siblings), the description is fairly complete. It covers syntax, helpers, timeout, and required output. It could mention error handling for syntax errors or potential crashes, but is adequate for an AI agent.

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% with descriptions for both parameters. The description adds significant value beyond the schema by explaining ES3 syntax, required return pattern, and listing available helpers in detail.

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?

The description clearly states the purpose: 'Execute custom ExtendScript code in Premiere Pro.' It distinguishes itself from sibling tools (which are specific actions) by being a generic code execution tool.

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 description provides clear context: it is for executing arbitrary ExtendScript code and includes constraints (ES3 syntax, mandatory return). It implies use when no sibling tool covers the task, but does not explicitly state when not to use or offer direct alternatives.

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

Install Server

Other Tools

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/leancoderkavy/premiere-pro-mcp'

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