Skip to main content
Glama
leancoderkavy

Premiere Pro MCP Server

Compute Mask Fit Motion

compute_mask_fit_motion
Read-onlyIdempotent

Compute the Motion Scale (%) and Position needed to place a still image's subject inside an existing Rounded Crop or similar mask, using a caller-supplied subject box.

Instructions

Inspect only. Compute the Motion Scale (%) and Position that place a still image's subject inside an existing Rounded Crop, Crop, or similar mask effect. Reads the sequence frame size, the source frame size, current Motion values, and the mask effect's parameters, then solves the geometry deterministically from a caller-supplied subject box (fractions of the source image, for example head-top to chin). No image analysis and no changes to Premiere. Apply the result with set_clip_scale and set_clip_position (or set_effect_property), then verify with capture_frame. Assumes Rotation 0 and uniform scale; mask geometry is treated as fixed in the sequence frame (mask_space 'sequence').

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
node_idYesNode ID of the video clip that holds the still image and its Motion effect.
subjectYesSubject box in the SOURCE image as fractions of the source frame (0..1), for example top = head-top and bottom = chin or collar.
fit_axisNoFit the subject's height to placement top/bottom (default) or its width to placement left/right.
placementNoWhere the subject should sit inside the mask, as fractions of the mask's bounding box. Defaults: top 0.15, bottom 0.85, center_x 0.5 (height fit); left 0.15, right 0.85, center_y 0.5 (width fit).
mask_spaceNoWhere the mask geometry lives. 'sequence' (default): the mask stays fixed in the sequence frame while Motion moves the image (mask on an adjustment layer or nest, or an effect that renders after Motion). 'clip': the mask moves with the clip's Motion, so Motion cannot reframe the subject inside it and the tool returns an error explaining that.
mask_effectNoDisplay name or match name of the mask effect (case-insensitive). Defaults to 'Rounded Crop'. Built-in 'Crop' Left/Top/Right/Bottom percentages are supported too.
mask_node_idNoNode ID of the clip that carries the mask effect when it is not the image clip, for example an adjustment layer or nest above it. Defaults to node_id.
source_widthNoSource image width in pixels. Overrides the value read from project metadata; required with source_height when Premiere does not report it.
mask_overrideNoMask bounding box as fractions of the SEQUENCE frame. Skips reading mask parameters; use it when the effect's parameters cannot be interpreted.
source_heightNoSource image height in pixels. Overrides the value read from project metadata.
source_prescaleNoExtra scale Premiere applies before Motion, for example when Scale to Frame Size is on (sequence height / source height for a letterboxed fit). Defaults to 1.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYesWhether the tool completed successfully.
dataNoTool-specific result data when ok is true; on failure, diagnostic detail when the tool provides it.
toolYesThe registered MCP tool name.
errorNoFailure detail when ok is false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.18.6
    • changedOutput schema / properties / data / description
      Previous value: -"Tool-specific result data when ok is true."New value: +"Tool-specific result data when ok is true; on failure, diagnostic detail when the tool provides it."
  2. Addedv1.18.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description reinforces 'no changes to Premiere' plus discloses non-obvious limits: no image analysis, assumes Rotation 0 and uniform scale, mask geometry treated as fixed in sequence frame, and an explicit error condition for clip-space masks.

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?

Front-loads the 'Inspect only' constraint and the core purpose, then moves to assumptions. Dense but mostly earning its place; the final assumptions sentence could be trimmed slightly without loss.

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?

An output schema exists so return values need not be explained. The description covers scope, prerequisites, apply/verify workflow, error behavior, and geometric assumptions for an 11-parameter nested-schema tool – nothing critical is missing.

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

Parameters3/5

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

Schema description coverage is 100%, so parameters are already well documented; the description's main additions are the subject-box example ('head-top to chin') and the mask_space semantics. It adds some framing but not enough beyond the schema to exceed baseline.

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 ('Compute the Motion Scale (%) and Position that place a still image's subject inside an existing Rounded Crop, Crop, or similar mask effect') with the exact inputs read and the deterministic solution method. An agent can distinguish this from sibling geometry/motion tools immediately.

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 frames the tool as 'Inspect only', names the downstream apply tools (set_clip_scale, set_clip_position, or set_effect_property) and the verification step (capture_frame). It also defines when the tool is inapplicable via the mask_space 'clip' case that returns an error.

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