Skip to main content
Glama

ass_align_lines_to_silence

Aligns subtitle line starts to the end of detected audio silence, shifting line timing so cues do not begin in silent gaps. Returns a dry-run plan before applying changes.

Instructions

Move line starts out of audio silence (ffmpeg silencedetect).

A line whose start falls inside a silent interval is pushed to the end of that interval: shift_only="both" (default) moves the end by the same delta, "start" keeps the end where it is and shortens the line. Lines that start on audio are left alone and are not reported as suggestions.

Args: selection: lines to consider. video: media file; defaults to the workspace video/audio. noise_db: silence threshold in dBFS. min_silence_s: shortest silence to act on. doc_id: document id. dry_run: when True (the default) the plan is returned and nothing is written. shift_only: None/"both" or "start". max_shift_ms: ignore suggestions longer than this.

Returns: The same plan as :func:ass_align_to_silence plus "dry_run" and "applied" so the caller always knows whether the document changed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
videoNo
doc_idNo
dry_runNo
noise_dbNo
selectionNo
shift_onlyNo
max_shift_msNo
min_silence_sNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: it discloses the default is dry_run=True so nothing is written, exactly how line ends change under shift_only='both' vs 'start', and that the result carries 'dry_run'/'applied' so the caller knows whether the document changed. Mutation scope is fully characterized.

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?

Front-loaded with the core action and cleanly organized into Args/Returns. It is appropriately sized for eight parameters, though the Returns paragraph partially overlaps with the existing output schema.

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?

For an eight-parameter, no-annotation mutation tool this is complete: every parameter is explained, the default dry-run behavior is stated, and the dry_run/applied return fields are surfaced even though an output schema exists.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate, and it documents all eight parameters (selection, video, noise_db, min_silence_s, doc_id, dry_run, shift_only, max_shift_ms) with meaning beyond the bare titles, including the enum-like values for shift_only.

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+resource ('Move line starts out of audio silence') and the mechanism (ffmpeg silencedetect). It also implicitly distinguishes itself from the sibling ass_align_to_silence by referencing that function's plan as its return baseline.

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?

Explains the operational context clearly ('Lines that start on audio are left alone and are not reported as suggestions'), so an agent knows which lines are affected. It does not, however, explicitly name when to prefer this over adjacent timing tools such as ass_fix_timing or ass_align_to_silence.

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