Skip to main content
Glama

Close the gap at a time

close_gap_at

Close a gap on one track at a specified timeline time by shifting later clips left to meet the previous clip or time 0; optionally move linked clips to preserve sync.

Instructions

Close the empty space that contains a timeline time on one track: the clips after it on that track move left until they touch the previous clip (or time 0). Only that track moves; with include_linked=true the linked audio/video clips of the moved clips move by the same amount when they have room (those that do not are listed in linked_not_moved). Fails with NOT_FOUND when a clip occupies that time or nothing follows it. Returns the gap that was closed and the number of clips moved.

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": {
      "track_type": "<track_type>",
      "track_index": "<track_index>",
      "time": "<time>"
    },
    "name": "close_gap_at"
  }
}

Input Schema

NameRequiredDescriptionDefault
timeYesAny timeline time inside the gap, in seconds.
track_typeYesTrack type: "video" or "audio".
sequence_idNoStable sequence id (from list_sequences). Omit to use the active sequence.
track_indexYes0-based track index (0 = V1 or A1).
sequence_nameNoSequence name; used only when sequence_id is not given.
include_linkedNoMove the linked clips on other tracks by the same amount to keep sync. Default false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.3/5.0
Behavior4/5

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

The annotations declare a safe, non-destructive mutation (readOnlyHint=false, destructiveHint=false), and the description adds real behavioral detail: which clips shift, that only the target track moves, that linked clips follow only when they have room, and that blocked ones are listed in linked_not_moved. The failure and return-value behavior are also disclosed. It is not a 5 only because it does not spell out permissions or confirmation requirements.

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 core action and its scope come first, then linked-clip behavior, then failure modes, then return values – good front-loading. The sentences are dense and only slightly run-on, and no sentence is filler.

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?

With no output schema, the description carries the return-value burden and does so by stating it returns the closed gap and the number of clips moved. Failure and linked-clip edge cases are covered. Only the sequence-targeting behavior is left to the schema, which is documented at 100% coverage, so nothing essential is missing.

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 3 is the baseline; the description adds meaning beyond the schema by explaining what happens to linked clips when there is no room (they are listed in linked_not_moved), which sharpens the include_linked parameter. It also clarifies that 'time' means any time inside the gap, not just the gap start. The sequence-selector parameters are left entirely to the schema.

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 names the specific verb (close), the resource (the gap containing a given timeline time), and the exact scope (one track, clips after the gap shift left to the previous clip or time 0). That scope statement implicitly separates it from close_all_gaps without the sibling being named, and it is more precise than the bare title 'Close the gap at a time'.

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?

It is clear about the operational context: any timeline time inside the gap, one track only, and the NOT_FOUND conditions (a clip occupies that time, or nothing follows it). The include_linked flag's purpose and its limits are explained. It stops short of telling the agent which sibling to use when it wants to close every gap, so it is not a full 5.

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