Skip to main content
Glama

Fit clip to frame

fit_clip_to_frame
Idempotent

Scales a video clip uniformly to fit inside the sequence frame without cutting off content, adding letterbox or pillarbox, and centers it by default.

Instructions

Scale a video clip uniformly so the whole picture fits inside the sequence frame (letterbox/pillarbox, nothing cut off), and centre it (position and anchor to the centres) unless center=false. The scale is computed from the clip's source frame size and the sequence frame size. Returns the scale used and the clip's transform.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "fit_clip_to_frame"
  }
}

Input Schema

NameRequiredDescriptionDefault
centerNoAlso centre the clip. Default true.
clip_idNoStable clip id (from get_sequence_structure / list_clips). Preferred.
clip_indexNo0-based index of the clip in its track's clip list, as reported by list_clips / get_sequence_structure. Usually time order, but a moved clip can keep its old index, and indices shift after edits: prefer clip_id.
track_typeNoUsed with track_index + clip_index when clip_id is not given. Default "video".
sequence_idNoStable sequence id (from list_sequences). Omit to use the active sequence.
track_indexNo0-based track index (0 = V1 or A1).
sequence_nameNoSequence name; used only when sequence_id is not given.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true and destructiveHint=false, so the safety profile is covered. The description adds real context beyond that: how the scale is derived (source frame size vs sequence frame size), the exact centring effect on position and anchor, and the return payload (scale used plus transform). It does not mention failure modes when the clip or sequence cannot be resolved.

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?

Three sentences, front-loaded with the core action and its visual consequence, then the computation rule, then the return value. Every sentence contributes; the only marginal wording is the parenthetical letterbox/pillarbox clarification, which is still helpful disambiguation.

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?

For a seven-parameter, zero-required mutation tool with no output schema, the description covers the essential pieces: what changes, how the value is computed, and what is returned. It could be stronger on clip-resolution precedence (clip_id vs track/clip_index) and on behaviour when no sequence is specified, but the schema already carries much of that.

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 all seven parameters are already documented, which sets the baseline at 3. The description adds behavioural meaning for one of them only, explaining that center drives both position and anchor to the centres, and leaves the clip-identification and sequence-resolution parameters entirely to the schema.

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?

"Scale a video clip uniformly so the whole picture fits inside the sequence frame (letterbox/pillarbox, nothing cut off)" gives a specific verb plus resource and pins down the resulting geometry, which implicitly separates it from fill/crop-style siblings. It never names those siblings, so the differentiation is inferred from the 'nothing cut off' clause rather than stated.

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 conveys the fit-vs-fill intent, which implies when this tool is the right choice, but it never explicitly says when to prefer fill_clip_to_frame or set_clip_scale_to_frame_size, nor does it list prerequisites such as needing a selected/active sequence. Usage is implied rather than directed.

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