Skip to main content
Glama

Close all gaps

close_all_gaps

Removes empty space between clips in a Premiere Pro sequence by packing selected tracks or shifting all tracks together to preserve sync.

Instructions

Remove empty space between clips. mode "per_track" (default) packs each selected track on its own: every clip moves left until it touches the previous one (linked audio and video can lose sync if their tracks have different gaps). mode "together" removes only the time ranges that are empty on every track and shifts all tracks by the same amount, so sync is kept. Select one track with track_type + track_index, one type with track_type, or everything by default. Returns the gaps closed and the sequence duration before and after.

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

Input Schema

NameRequiredDescriptionDefault
modeNo"per_track" (default) or "together".
track_typeNoRestrict to one track type: "video" or "audio". Omit for both.
sequence_idNoStable sequence id (from list_sequences). Omit to use the active sequence.
track_indexNoRestrict to one 0-based track index (needs track_type). Omit for every track of that type.
sequence_nameNoSequence name; used only when sequence_id is not given.
include_leadingNoAlso close the empty space before the first clip. Default true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.4/5.0
Behavior5/5

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

The description discloses a real behavioral risk that the annotations do not: per_track mode can break audio/video sync when tracks have differing gaps, and together mode avoids it. It also states the observable outcome (gaps closed, sequence duration before and after), which is exactly the side-effect visibility a mutation tool needs.

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?

The description is front-loaded with the core action, then modes, then scoping, then return value, in four dense sentences with no filler. Parenthetical caveats are placed exactly where they matter, next to the mode they qualify.

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?

Despite having no output schema, the description states what is returned (gaps closed plus duration before and after). For a six-parameter mutation tool, the mode semantics, scoping rules, default behavior, and sync hazard together cover everything an agent needs to call it correctly.

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 baseline is 3, but the description earns more by explaining the semantic difference between the two mode values in depth and by clarifying how track_type and track_index combine to scope the operation. Defaults for mode and include_leading are restated from the schema rather than added to, which keeps it from a 5.

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 opening sentence gives a concrete verb and resource: 'Remove empty space between clips,' and the mode descriptions make the operation's scope precise. It does not explicitly distinguish itself from singular siblings like close_gap_at or from the gap-inspection tools, so an agent must infer the 'all' scope distinction from the name and the parameter list.

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?

Strong guidance on which mode to pick: per_track packs tracks independently while together preserves sync, with an explicit warning that linked audio/video can lose sync under per_track. Selection scoping is also spelled out (track_type + track_index, track_type alone, or nothing for everything). It stops short of naming the alternative tools an agent should use when it wants a single gap closed.

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