Skip to main content
Glama

Get clip neighbours

get_clip_neighbors
Read-onlyIdempotent

Returns the previous and next clips on the same track for a given clip, including gap_before and gap_after in seconds to reveal spacing and track-end boundaries.

Instructions

Return the previous and the next clip on the same track as a clip, with gap_before and gap_after in seconds (0 = the clips touch). previous/next are null at the ends of the track; gap_before is then the distance from the sequence start and gap_after is null. Use find_sequence_gaps for every gap of a sequence.

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

Input Schema

NameRequiredDescriptionDefault
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

A4.2/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive, closed-world, so the safety profile is covered. The description adds genuine value beyond that by defining gap semantics (0 = clips touch) and the end-of-track edge case where previous/next are null and gap_after is null while gap_before measures from sequence start.

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?

Three tight sentences, front-loaded with the core return contract, then edge cases, then the sibling routing. Nothing is repeated and no sentence could be dropped without losing information.

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-shape burden and does most of it: it names the fields and their units and the null behaviour at track ends. It does not say whether previous/next are full clip objects or bare identifiers, which is the one remaining ambiguity for a caller consuming the result.

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 clip_id, clip_index, track_type, sequence_id, track_index, and sequence_name are all documented in the schema, including the clip_id-preferred guidance. The description adds no parameter-level detail, so the baseline 3 applies.

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 — return the previous and next clip on the same track — plus exactly what else comes back (gap_before/gap_after in seconds). An agent can distinguish it from the many get_clip_* siblings immediately.

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?

Explicitly routes the neighbouring-gap use case elsewhere: "Use find_sequence_gaps for every gap of a sequence." That gives a clear when-to-use-the-alternative rule, though it doesn't spell out the inverse condition (when this tool beats get_clip_details or get_clip_at_time).

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