Skip to main content
Glama

ass_update_lines

Batch-edit selected ASS subtitle lines: apply shared field values, shift timing with pad_ms, and clamp times to prevent overlap with unselected lines.

Instructions

Change the same fields on every selected line.

Args: selection: selection spelling (see module docstring); None = all. doc_id: document to edit; the current one when omitted. start_ms/end_ms/text/style/actor/effect/layer/comment/margin_l/margin_r/ margin_v: applied only to the lines you pass, as in :func:ass_update_line. pad_ms: widen every selected line by this many ms on both sides (start -= pad_ms, end += pad_ms); negative values trim it. clamp_to_avoid_overlap: after the edit, pull each selected line's times back so it no longer overlaps an unselected line (best effort; worst case a 10 ms line is left in the gap).

Returns {"doc_id", "changed": [<0-based indices>], "count", "clamped": [<0-based indices>], "fields": [field names], "lines": [<dict>, ...]}. Snapshot-backed. Line indices are 0-based.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textNo
actorNo
layerNo
styleNo
doc_idNo
effectNo
end_msNo
pad_msNo
commentNo
margin_lNo
margin_rNo
margin_vNo
start_msNo
selectionYes
clamp_to_avoid_overlapNo

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 to lean on, the description carries the caveats itself: it explains pad_ms arithmetic (start -= pad_ms, end += pad_ms), that negative values trim, that clamping is best-effort with a stated 10 ms worst case, that the operation is snapshot-backed, and what the return contains. It does not state permission/undo implications, but the disclosed side effects (silent timing adjustment) are substantial.

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 one-line purpose, then Args and Returns, which is appropriate for a 15-parameter tool. Prose is dense but every clause adds contract detail (padding math, clamp fallback); minor verbosity in the enum-style field listing.

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?

Given 15 parameters, no annotations, and a stated output schema, the description covers selection defaults, mutation semantics, side effects, and return shape, so an agent can call it correctly. The only hand-off is deferring several field params to the ass_update_line docstring.

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 0% for 15 parameters, so the description must compensate, and it largely does: selection semantics (None = all), doc_id default (current document), pad_ms direction/negative behavior, and clamp_to_avoid_overlap behavior are all explained. The remaining field params (text/style/actor/margins/etc.) are only defined by reference to ass_update_line, leaving their individual meaning outside this description.

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 opening sentence states a specific verb+resource and scope: 'Change the same fields on every selected line.' It clearly distinguishes itself from the single-line sibling by the batch phrasing ('every selected line') and the required 'selection' parameter.

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 batch scope plus the cross-reference 'as in :func:`ass_update_line`' hints at when to prefer this over the single-line tool, but there is no explicit when/when-not guidance or named alternative rule. A reader must infer that ass_update_line is the single-line counterpart.

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