Skip to main content
Glama

ass_merge_lines

Merge selected ASS subtitle lines into the earliest-starting line, join their texts with a separator, and remove the originals to simplify timing edits.

Instructions

Merge the selected lines into the earliest one.

The selected lines are sorted by start (then end) time and their raw texts are joined with separator (default the literal \N) into the earliest-starting line, which keeps its style, actor, effect, layer and margins; its span becomes the union of the merged spans. The other selected lines are removed. Needs at least two lines.

Returns {"doc_id", "index": <0-based index of the merged line *after* the merge>, "removed": [<pre-merge 0-based indices of the lines folded away>], "removed_count", "start_ms", "end_ms", "text", "line": <dict>}. Snapshot-backed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
doc_idNo
selectionYes
separatorNo\N

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/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 delivers: sort order of selected lines, exact join semantics via separator, the properties preserved (style, actor, effect, layer, margins), the span-union rule, and that other lines are removed. It even discloses the 'Snapshot-backed' persistence trait, which no structured field conveys.

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-loads the action in the first sentence, then layers behavioral detail and the return shape. It is dense but every clause adds information; the inline return-structure enumeration is slightly heavy given an output schema exists, but not wasteful.

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 a mutation tool with no annotations, the description covers the preconditions, precise merge mechanics, and side effects (removal of folded lines, index shifting). Return values are already specified by the output schema, yet the description reinforces them, leaving nothing an agent needs to invoke it correctly.

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 coverage is 0%, so the description must compensate and it partially does: separator is fully explained including its literal default of \N, and selection is characterized (must contain at least two lines). The doc_id parameter is never mentioned, leaving a gap the schema cannot fill.

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 (merge) and resource (selected lines) with unambiguous behavior: fold selected lines into the earliest one. An agent can distinguish it from siblings like ass_split_line or ass_duplicate_lines without opening any schema.

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?

Provides one concrete precondition ('Needs at least two lines'), which is genuine usage context. However, it never routes the agent among alternatives (e.g., vs. ass_split_line/ass_unmerge) or states when merging is preferred, so usage remains implied rather than explicit.

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