Skip to main content
Glama

Fit a region

mask_fit

Frames a face or object rectangle to fill the sequence or a target box by computing and applying Motion scale and position, static or keyframed between two rects.

Instructions

Frame a rectangle of the clip (face, object) to fill the sequence frame or a target box: computes Motion scale and position and applies them (static, or keyframed between from and to rects). Rects are in pixels of the clip as it shows at 100% scale centered.

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": {
      "clips": "<clips>",
      "rect": "<rect>"
    },
    "name": "mask_fit"
  }
}

Input Schema

NameRequiredDescriptionDefault
fitNo
rectYes
clipsYesid, [ids] or {tracks,name_regex,kind,selected,at,start_min,start_max,every_nth,offset,limit}
paddingNoFraction around the rect, default 0.1
projectNo
to_rectNoAnimate from rect (clip start) to to_rect (clip end)
sequenceNoSequence id/name (default: active)
expected_project_pathNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.5.3

TDQS

A3.6/5.0
Behavior4/5

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

Beyond the annotations (openWorldHint=false, destructiveHint=false), it discloses that the tool computes and applies Motion scale/position, either statically or keyframed from rect to to_rect. It does not state whether existing Motion/keyframes are overwritten, but it provides substantive behavioral context for a non-destructive mutation.

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 one dense but front-loaded sentence with no filler; the core operation appears first and parentheticals clarify static vs keyframed use. It could be slightly easier to scan if split, but every clause carries information.

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

Completeness3/5

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

For an 8-parameter mutation tool with nested rects and no output schema, the description covers the core framing behavior and coordinate units but does not explain the fit enum, padding behavior, or overwrite/keyframe-replacement semantics. It is sufficient to understand the main operation but not complete for safe invocation across all parameters.

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?

The schema already documents clips, padding, sequence, and to_rect at 50% coverage, while the description adds important coordinate semantics: rects are in pixels at 100% scale centered. It still leaves the fit enum, padding effect, and project/expected_project_path meaning to the schema or inference.

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?

The description gives a precise verb and resource: framing a rectangle of a clip to fill the sequence frame or a target box, and computing/applying Motion scale and position. It is clear what the tool does, but it does not explicitly differentiate itself from siblings such as add_keyframes or apply_effects beyond mentioning keyframing.

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

Usage Guidelines3/5

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

The description implies appropriate use for reframing a face/object region and for static or keyframed fitting between rects, but it gives no explicit when-to-use/when-not guidance or named alternatives to compare against siblings.

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