Skip to main content
Glama

ass_add_typesetting

Build and apply an ASS override block to selected subtitle lines, combining position, move, fade, clip, alignment, and extra tags into one merged typesetting tag string.

Instructions

Build a leading override block out of named typesetting pieces.

Args: selection: selection spelling; every selected line receives the block. doc_id: document to edit; the current one when omitted. pos: [x, y] -> \pos(x,y). an: alignment, a plain integer 1..9 (7 -> \an7). Booleans, floats and out-of-range values are rejected; \q-style alignments are not part of this helper. move: \move animation. Accepted shapes: six numbers [x1, y1, x2, y2, t1, t2] (times in milliseconds), four numbers, two pairs, a pair (expanded to a zero-length move), or a dict with x1/y1/x2/y2 and optional t1/t2. fade: \fad/\fade. A pair [in_ms, out_ms] produces \fad(in,out); a 4-tuple [a1, a2, a3, t] produces \fade(a1,a2,a3,t,t,t,t); the full 7-tuple [a1, a2, a3, t1, t2, t3, t4] is passed through verbatim; a dict with a1/a2/a3/t1..t4 also works. clip: \clip/\iclip. A rectangle [x0, y0, x1, y1], a drawing path string ("m 0 0 l 100 0 100 100" — it must contain a drawing command, otherwise the string is rejected instead of being handed to libass as a no-op), [scale, path], or a dict {"rect": [...]} / {"drawing": "...", "scale": n} with "inverse": true to emit \iclip. org: [x, y] -> \org(x,y). extra_tags: any additional override text (braces and the leading backslash are optional) appended to the block in the order given. reset_first: put \r at the front of the block so the line starts from the style's values before the new tags are applied. in_place: write the block back to the document (snapshot-backed, True by default). With False the planned lines are returned but the document is left alone.

Returns {"doc_id", "tag_string", "override", "reset_first", "count", "changed", "written", "in_place", "lines": [{"index", "before", "text", "changed"}], "text"}. tag_string is the exact tag string produced (without the braces, e.g. \an8\pos(100,200)); text is the new line text when the selection resolved to a single line, otherwise None (the per-line texts are in lines). The block is merged into the line's existing first block so duplicated tags are updated instead of stacking.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
anNo
orgNo
posNo
clipNo
fadeNo
moveNo
doc_idNo
in_placeNo
selectionYes
extra_tagsNo
reset_firstNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/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 behavioral burden and does so well: it states the default write behavior (snapshot-backed, in_place=True), the no-write alternative (in_place=False), and the merge semantics ('merged into the line's existing first block so duplicated tags are updated instead of stacking'). It also discloses validation behavior (booleans, floats and out-of-range values rejected for 'an'; drawing strings without a command rejected). It stops short of permissions/undo implications, hence not a 5.

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?

The opening sentence front-loads the purpose, and the verbosity is almost entirely load-bearing parameter documentation rather than padding. A few entries are dense, but each shape mapping earns its place and there is little that could be cut without losing semantics.

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 complex 11-parameter mutation tool this covers purpose, per-parameter encodings, mutation semantics, and even the return shape (although an output schema already exists, so return values need not be explained). Nothing an agent needs to construct a correct override block correctly appears to be 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%, so the description must compensate entirely, and it does: each of the 11 parameters is documented with accepted input shapes and exact tag output (e.g. move as 6/4/2-tuple or dict with optional t1/t2 in milliseconds; fade 2-tuple vs 4-tuple vs 7-tuple; clip rectangle vs drawing path vs [scale, path] vs dict with inverse). This is far richer than anything the bare schema provides.

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?

The description gives a specific verb and resource ('Build a leading override block out of named typesetting pieces') and enumerates exactly which ASS tags it can emit (\pos, \an, \move, \fad/\fade, \clip/\iclip, \org). It is clear on its own, but it never names or contrasts with closely related siblings such as ass_set_tag, ass_apply_tag_to_block, or ass_insert_tag_at, so an agent cannot disambiguate purely from the text.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no explicit when-to-use, when-not-to-use, or alternative-tool guidance. The arg notes imply the block is applied to every selected line and that in_place=False returns a plan without writing, but the caller is left to infer when this helper is preferable to the many other tag-manipulation siblings.

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