Skip to main content
Glama

ass_fix_timing

Extend subtitle end times to meet minimum duration or maximum CPS, optionally avoiding overlaps, and preview changes with dry_run before applying.

Instructions

Compute timing fixes and apply them only when dry_run is False.

Only end times move. A line shorter than min_duration_ms is extended to it; a line reading faster than max_cps/target_cps is extended so that its characters per second fall back to that figure. With avoid_overlap an extension stops at the next line's start on the same layer, minus keep_gaps_ms; when there is no room the fix is reported as blocked instead of being applied.

Args: selection: lines to fix. doc_id: document id. dry_run: True (default) returns the plan and writes nothing. min_duration_ms: shortest acceptable duration. target_cps: extend faster lines until they read at this rate. max_cps: same, used when target_cps is not given. avoid_overlap: stop extensions at the neighbouring line. keep_gaps_ms: keep this much room before the neighbouring line.

Returns: {"doc_id", "dry_run", "applied", "parameters": {...}, "count", "changes": [{"index", "field", "old_ms", "new_ms", "old", "new", "reason"}], "blocked": [{"index", "reason", "wanted_ms", "limit_ms"}]}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
doc_idNo
dry_runNo
max_cpsNo
selectionNo
target_cpsNo
keep_gaps_msNo
avoid_overlapNo
min_duration_msNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/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 that only end times move (scope of mutation), that dry_run=True writes nothing, and that avoid_overlap can cause a fix to be reported as blocked rather than applied. The blocked/no-room behavior is exactly the kind of non-obvious trait annotations would otherwise need to supply.

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 behavior (compute + conditional apply), then the algorithm, then structured Args/Returns blocks. Efficient, though slightly long and the Returns block partly duplicates the 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?

An 8-param mutation tool with no annotations is fully covered: what changes, when it changes, what happens when it can't change, and the shape of the result. Nothing an agent needs to invoke it correctly is missing.

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 description coverage is 0% and 8 parameters are undocumented in the schema, so the description has to compensate — and every parameter is explained with real semantics (selection, doc_id, dry_run default, min_duration_ms, target_cps vs max_cps fallback, avoid_overlap, keep_gaps_ms). The target_cps/max_cps precedence rule is meaning the schema alone could never convey.

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?

States a specific verb+resource ('Compute timing fixes and apply them'), and the body narrows it to a precise operation: extending end times so lines meet min_duration_ms and cps limits. An agent can tell what it does, but it never names the close siblings it could be confused with (ass_set_durations, ass_shift_times, ass_scale_times), which would have made the purpose discriminating rather than merely clear.

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?

Usage is implied rather than stated: the tool is for fixing lines that are too short or read too fast, and the dry_run default advertises a plan-then-apply workflow. There is no explicit when-to-use vs when-to-use-something-else guidance, nor any mention of when this is preferable to set_durations/set_times.

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